admob

AdRequest.TEST_EMULATOR or something else?

允我心安 提交于 2019-12-24 02:27:10
问题 My application is ready, and i have admob into it. I also have the AdRequest.TEST_EMULATOR used for fetching the add. Is it right way or its just the testing way to fetch add. Will i get reveue in live application if i use AdRequest.TEST_EMULATOR. Thanks 回答1: Using AdRequest.addTestDevice(TEST_EMULATOR) is the way to fetch the add during testing. However, this piece of code will only fetch test ads from emulators. Everyone running your app on a device will get live ads, and you'll get revenue

Admob add within multiple activities

三世轮回 提交于 2019-12-24 02:23:34
问题 I am trying to add Admob in my android application which consists of over 15 activities. My question is which solution is the best one, considering that I can't extend any "BaseActivity" (for various reasons), as presented in this example: Admob on Multiple Activities? and I don't want to violate any agreements regarding rules making adds requests and their use. So far i've created a file admob.xml containing the com.admob.android.ads.AdView and I use "include layout" in each layout ".xml"

iOS app's Documents and Data becomes huge

余生颓废 提交于 2019-12-24 02:18:25
问题 I'm using admob mediation for ads on my applications. Normally my app's size is 40 mb, but my app's documents and data becomes 300+ mb. I've noticed that my app's document and data becomes huge after using it regularly. I've made some investigation and I've recovered my app's documents and data (.xcappdata) using xcode. I've noticed that in AppData/Library/Preferences, there were duplicates files of my app default preferences. Some file named such as com.xxx.myappID.plist.ZHxFTUd. In order to

How to automatically close admob interstitial ad if users click the Android home button?

 ̄綄美尐妖づ 提交于 2019-12-24 02:14:51
问题 I was using the interstitial ad from Admob in my android app. The interstitialAd.show() is called at certain events of the app. Everything worked fine but one annoying use case with the ad. If users click HOME while the ad is displaying or the ad activity (i.e. users click the ad) is active, the ad or the ad activity will be displayed after switching back to the app. I would prefer that the app is displayed (i.e. the main activity is at the top of the activity stack) since it looked confusing

Admob ad stopped working in Android pie API28

浪尽此生 提交于 2019-12-24 00:56:21
问题 I already tried this and this but I am not using multiple WebViews. Also, my account is not new and ads are showing in other lower versions of Android. W/Ads: There was a problem getting an ad response. ErrorCode: 0 W/Ads: Failed to load ad: 0 回答1: Clearing google play services cache and data seems to fix this for me but it does come back after redeploying an apk to my device in either debug mode or not debug mode using Android Studio. Not really happy about having to clear play services data

Programmatically turn off Google AdMob Ads (iOS)

依然范特西╮ 提交于 2019-12-24 00:34:30
问题 I am using Google AdMob for iOS: Google AdMob I was wondering whether I'm able to turn off these ads programmatically so they stop displaying. After reading through the SDK I can't see anywhere to toggle the ads on or off. EDIT: This is how I load the Google AdMob code: MainViewController.m - (void) viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. // Create a view of the standard size at the bottom of the screen. // Available AdSize constants

should I make Different id for each banner and Interstitial Ad in Admob

。_饼干妹妹 提交于 2019-12-24 00:34:13
问题 I have multiple activities in my application and so i have multiple banners and interstitial Ads, ** so should I keep **a single publisherID for all the banners and interstitial ads or should I make a different publisher ID for each ad in the application ? 回答1: In the new Admob dashboard publisherId relates to you (your account) and AdUnitId relates to ad spots that you want filled. I'll out my answer in terms of the new dashboard. NB As of Jan-2014 I think the dashboard has been rolled out

Interstitial Ad's Listener's onAdLoaded() won't run

谁都会走 提交于 2019-12-24 00:06:14
问题 interstitial.setAdListener(new AdListener(){ public void onAdLoaded(){ display(); } }); I tried with the debugger, the 1st line was run, but the second line was simply not run. This is how I initialize the ad in the onCreate method: interstitial = new InterstitialAd(this); interstitial.setAdUnitId("******************************"); AdRequest adRequest = new AdRequest.Builder().build(); interstitial.loadAd(adRequest); and InterstitialAd interstitial; outside of the method inside the class. The

Confusion with admob ad unit ids

这一生的挚爱 提交于 2019-12-23 22:07:50
问题 I followed the tutorial to create an ad banner in my app. This works so far, I can see the test ad. However, the tutorial instructs me to use two different ad-ids in two different locations: in the activity: MobileAds.initialize(this, "ca-app-pub-3940256099942544~3347511713"); in the layout: ads:adUnitId="ca-app-pub-3940256099942544/6300978111" Question 1: What is the difference between the two ids? Why are they different? What's the purpose? I have created an account at admob and also an ad

Android: Implement admob on surfaceview

本小妞迷上赌 提交于 2019-12-23 19:09:09
问题 I have an activity in form of a small game which uses SurfaceView. Below are the code snippets.. I am confused how to implement admob on surfaceview. Please suggest. public class DroidzActivity extends Activity { private static final String TAG = DroidzActivity.class.getSimpleName(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // requesting to turn the title OFF requestWindowFeature(Window.FEATURE_NO_TITLE); // making it full screen