App Return Ads - cleveradssolutions/CAS-Flutter GitHub Wiki
:zap: Before you start
Make sure you have correctly Initialize SDK.
The Return Ads which is displayed once the user returns to your application after a certain period of time.
To minimize the intrusiveness, short time periods are ignored.
Return ads are disabled by default.
Enable the ad
If you want to enable the Return Ads, simply pass AdCallback
as the parameter of the method.
manager.enableAppReturn(AppReturnListener());
class AppReturnListener extends AdCallback {
@override
void onClicked() {
// Called when ad is clicked
}
@override
void onClosed() {
// Called when ad is dismissed
}
@override
void onComplete() {
// Called when ad is completed
}
@override
void onImpression(AdImpression? adImpression) {
// Called when ad is paid.
}
@override
void onShowFailed(String? message) {
// Called when ad fails to show.
}
@override
void onShown() {
// Called when ad is shown.
}
}
Disable the ad
When you no longer want to show ads to users after they return to the app, call the following method.
manager.disableAppReturn();
Skip next return
You can call this method when you intentionally redirect the user to another application (for example Google Play) and do not want them to see ads when they return to your application.
manager.skipNextAppReturnAds();
๐ Done! Whatโs Next?
- Try another ad format: