admob

How to create Android interstitial ads?

ⅰ亾dé卋堺 提交于 2019-12-28 05:36:06
问题 I tried things from many blogs but none gave a step-by-step solution. Should I edit something on the AdMob site? I created the site from the ad sit/app option under the Sites & Apps tab. I used this code: interstitial = new InterstitialAd(this, "MyAdMobID"); // Set Ad Listener to use the callbacks below interstitial.setAdListener(this); // Create ad request AdRequest adRequest = new AdRequest(); adRequest.addTestDevice(AdRequest.TEST_EMULATOR); // Begin loading your interstitial interstitial

Admob implementation Error

女生的网名这么多〃 提交于 2019-12-27 19:18:09
问题 I got a Problem with implementing Admob into an App. This is my main.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Large Text" android:textAppearance="?android:attr

Why are permissions being automatically added to my AndroidManifest when including Google Play Services library

扶醉桌前 提交于 2019-12-27 11:08:07
问题 I noticed that the following permissions were automatically added when i use the following in my build.gradle file compile 'com.google.android.gms:play-services:7.5.0' This did not occur with the earlier versions of the play-services. does anyone have a solution to remove these unwanted permissions? I am only using the ads function (INTERNET and ACCESSNETWORK_STATE). I got no need for the LOCATION and USE_CREDENTIALS permissions. How do you remove these unwanted permissions? I noticed that

Why are permissions being automatically added to my AndroidManifest when including Google Play Services library

二次信任 提交于 2019-12-27 11:05:25
问题 I noticed that the following permissions were automatically added when i use the following in my build.gradle file compile 'com.google.android.gms:play-services:7.5.0' This did not occur with the earlier versions of the play-services. does anyone have a solution to remove these unwanted permissions? I am only using the ads function (INTERNET and ACCESSNETWORK_STATE). I got no need for the LOCATION and USE_CREDENTIALS permissions. How do you remove these unwanted permissions? I noticed that

Do i need to link to legacy account in admob?

穿精又带淫゛_ 提交于 2019-12-25 17:48:23
问题 I have just created my account on AdMob two days ago. It is notified "On August 31, 2014, legacy AdMob will no longer be available. If you would like to import your legacy AdMob data into your new AdMob account, you first need to link your legacy account to your new account. Click Link account to get started." Do I need to update my account? Is my account legacy? Do i need to click on "link to legacy account"? 回答1: If you recently created your AdMob account you do not need to link or do

How can i make my app remeber/save the coins my app users earned my app? [closed]

纵饮孤独 提交于 2019-12-25 17:16:53
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I want my app to remember or save the number of coins that users earn in my app so that whenever they open my app again they can see their coins instead of a 0. 回答1: You should use shared preferences on Android. I write down a fully functional example of an application of a shared

AdMobs Banner: W/GooglePlayServicesUtil﹕ Google Play services is missing

陌路散爱 提交于 2019-12-25 14:49:13
问题 I used this to implement my AdMob Banners, however I am getting an error: W/GooglePlayServicesUtil﹕ Google Play services is missing. I have already added the following line to the build.gradle : compile 'com.google.android.gms:play-services-ads:8.4.0' Here is my onCreate() method: protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); AdView adView = new AdView(this); adView.setAdSize(AdSize.BANNER); adView.setAdUnitId(testBanner); RelativeLayout layout = new

AdMobs Banner: W/GooglePlayServicesUtil﹕ Google Play services is missing

∥☆過路亽.° 提交于 2019-12-25 14:48:41
问题 I used this to implement my AdMob Banners, however I am getting an error: W/GooglePlayServicesUtil﹕ Google Play services is missing. I have already added the following line to the build.gradle : compile 'com.google.android.gms:play-services-ads:8.4.0' Here is my onCreate() method: protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); AdView adView = new AdView(this); adView.setAdSize(AdSize.BANNER); adView.setAdUnitId(testBanner); RelativeLayout layout = new

Required XML attribute 'adsize' was missing (google play service)

◇◆丶佛笑我妖孽 提交于 2019-12-25 08:48:25
问题 There are so question like that but it's not duplicate because i have already used xmlns:ads="http://schemas.android.com/apk/res-auto" and i have done code mostly in java I want to use google play service for ads I have used below java code com.google.android.gms.ads.AdView adView = (com.google.android.gms.ads.AdView) activity.findViewById(R.id.adview); adView.setAdSize(AdSize.SMART_BANNER); adView.setAdUnitId(activity.getString(R.string.admob_id)); AdRequest adRequest = new AdRequest.Builder

Admob: Interstitial ads showing every time

巧了我就是萌 提交于 2019-12-25 08:36:33
问题 i'm finishing a video application and i'm displaying interstitial ads when leaving the video activity. I just want to show it once every X minutes, but it seems to be showing every time i leave that screen. This is my activity code. OnCreate: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle b = getIntent().getExtras(); videoId = b.getString("videoId"); setContentView(R.layout.youtube_player); interstitialAd= new InterstitialAd(this);