2

I am creating an app in which I want that when the user clicks on Banner ad,(Normally it opens the default browser to handle the redirect process)

Instead of this, It will not open any browser and only copy the link which is sent to default browser and open it inside my web view.

I want to get the URL from the banner ad. I had searched on google for it but unfortunately, I did not find anything useful. Thank you all of you for my help in advance...:-)

ankushalg
  • 523
  • 3
  • 23

1 Answers1

0

This is against the terms of service of your adMob i guess. You can't access the url and open it yourself in webview. But i can suggest you to create your own activity and make it default browser in manifest. I think that will work for you.

Here is example how to do it.

add these filters inside <activity></activity> of your webview activity

<intent-filter>
<action android:name="android.intent.action.VIEW" />
   <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

Hope this will help you.

Zeeshan Shabbir
  • 6,704
  • 4
  • 38
  • 74