I have a microphone button with which the user enters text into the TextView with his speech, after every second click on the stop microphone button Interstitial appears, however, when Interstitial appears and when Interstitial is closed, the previously entered text disappears from the TextView, when the microphone start button is started again, the previously entered text reappears. What needs to be done to keep the text visible when the Interstitial is closed. I tried onAdClosed but failed. Can anyone specifically answer, thanks!
InterstitialAd.java
InterstitialAd.load(getApplicationContext(),
mContext.getString(R.string.admob_interstitial_id),
new AdRequest.Builder().build(),
new InterstitialAdLoadCallback() {
@Override
public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {
interstitialAd.show((Activity) mContext);
}
public void onAdClosed() {
returnedText.setVisibility(View.VISIBLE);
}
}
);
The Start - Stop microphone button is located in the MainActivity.java and calls Interstitial from InterstitialAd.java
InterstitialLaunch interstitialLaunch = new InterstitialLaunch();
interstitialLaunch.inter_launched(MainActivity.this);