Android Question Admob Native Ads help needed

tarique

Member
I am trying to implement the Native ads for my app, Currently I have tested an example "admob_example" with the library "mwFirebaseAdmobNative". The problem is I don't want to start an activity for native ads, I just want to show the ad above the content (like float). I have also done this (picture attached) by instead of starting the activity, directly starting the code

"
Sub pnlNative_Click
nuad.Initialize(Me,"ca-app-pub-3940256099942544/2247696110",10dip,50dip,100%X-20dip,150dip,Root,True)
nuad.LoadNativeAd

End Sub

and this is working, but there is no exit button to remove the ad from the screen. However, there is an option in the coding to remove the view, after some time I can remove it,
"Sleep(10000)
nuad.RemoveView"



The back button will exit the app, there is also the designer layout (pic attached) for this native ad, I have tried to attach the exit button to it, but it is not shown despite writing the code in the script in the design layout.
Now help is needed to attach the exit button or close(x) button on the corner.

Best Regards
 

Attachments

  • admob1.jpg
    admob1.jpg
    108.2 KB · Views: 94
  • admob2.png
    admob2.png
    36.5 KB · Views: 97

asales

Expert
Licensed User
Longtime User
I just want to show the ad above the content (like float)
I don't think this is allowed by Admob.
I think that you can show the ad inside the content, but not above the content.
I would avoid this to prevent issues with AdMob's policy.
However, there is an option in the coding to remove the view, after some time I can remove it,
"Sleep(10000)
nuad.RemoveView"
Put the native ad in a panel if you can remove it after.
Now help is needed to attach the exit button or close(x) button on the corner.
This button is insert automatically when the ad is show. You don't see the button in the test ad.
Include your device as a test device in the AdMob console and check with real unit ad, that will show a label 'test' in the device.
 
Upvote 0
Top