what can I do to make this function not work and give a warning when the device is offline? I would appreciate your help.
Code:
if (adType == Sdkmanager.AD_REWARDED)
Website2APK.showInterstitialAd();
{
what can I do to make this function not work and give a warning when the device is offline? I would appreciate your help.
Code:
if (adType == Sdkmanager.AD_REWARDED)
Website2APK.showInterstitialAd();
{
2
Answers
you can add a condition to check the network connectivity
First, ensure your app has permission to access the network state by adding the following line to your
AndroidManifest.xml
:Next, modify your code to check for internet connectivity before attempting to show the ad: