'What is onAdDismissedFullScreenContent on Android Studio?
Is the function onAdDismissedFullScreenContent() working when the user closes the add or it works when the ad did not appear? I do not understand very well the meaning of dismissed in this context. The second question is, is it mandatory to put inside this onAdDismissedFullScreenContent function the following code? What is the intention of the following code? Could I put nothing on this function? Thanks in advance
onAdDismissedFullScreenContent(){
Intent intent = new Intent(getApplicationContext(), Activity.class);
startActivity(intent);
}
Solution 1:[1]
For the first question
Yes, this method onAdDismissedFullScreenContent() is user closes the full screen ad content.
And if the ad failed to show full screen content the method
onAdFailedToShowFullScreenContent(AdError adError) will be called.
You can check the public method summery for FullScreenContentCallback here
And for your second question,
No, it's not mandatory to set anything inside these functions.
and the code
Intent intent = new Intent(getApplicationContext(), ActivityWorkout.class);
startActivity(intent);
will open an activity called ActivityWorkout when the ad is closed.
I hope I answered your questions, Happy coding.
Solution 2:[2]
Intent intent = new Intent(currentActivity, home.class); currentActivity.startActivity(intent);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SuperGenedy |
| Solution 2 | X Body |
