I try this code below to shows an admob intertistial after close the intent that shows an youtube video, but don't works.
I make this approach:
- create a variable (see_admob) in Starter service that starts with False
- the variable receives True after the intent closes
- it checks in Activity Resume if true and show the admob
but after close the intent, the value returns to False and don't show the admob.
I don't know why and how to fix it.
Thanks in advance for any tips.
I make this approach:
- create a variable (see_admob) in Starter service that starts with False
- the variable receives True after the intent closes
- it checks in Activity Resume if true and show the admob
but after close the intent, the value returns to False and don't show the admob.
I don't know why and how to fix it.
Thanks in advance for any tips.
B4X:
Sub Activity_Resume
If Starter.see_admob = True Then ShowAd
End Sub
Sub btnYoutube_Click
Dim it As Intent
it.Initialize(it.ACTION_VIEW, url_video_youtube)
it.putExtra("force_fullscreen", True)
it.SetComponent("com.google.android.youtube/.UrlActivity")
StartActivity(it)
Starter.see_admob = True
End Sub
Sub ShowAd
If mwAdInterstitial.Status = mwAdInterstitial.Status_AdReadyToShow Then mwAdInterstitial.Show
End Sub