I have read the rules in the AdMob page and have tried to find an answer for this there. Couldn't find an answer there or somewhere to contact them so I'll try here.
It says the developer shouldn't inflate the earnings. Is this by clicking ads only or also by just loading an app.
Does it mean that as developer I can't use my own app, or just that I shouldn't press the ads?
Also, what is the purpose of having to give AdMob the deviceID? What is that used for? What would happen if you give it something similar instead (if it is just intrusive and doesn't serve a purpose)?
You Can use ur app as well as you also can tap on those ads,
Just impement a Method into AdRequest calls addtestdevice("DEVICEID")
Now Question is WHAT IS DEVICE ID, and How to get it,
Here is the Method to get DEVICE ID
String android_id = Settings.Secure.getString(this.getContentResolver(), Settings.Secure.ANDROID_ID);
String deviceId = md5(android_id).toUpperCase();
For e.g.
mAdRequest.addTestDevice(deviceId);
If You want to use it on Emulator the Emulator device id is TEST_EMULATOR
Hope it helps.
Cheers
-Aman
Related
I'm trying to fill the impression gap of my other ad provider with Facebook ads (Facebook audience network) to increase the income of my application.
So far so good, the testing works, I see the facebook test ad on the emulator, however, when it comes to this code:
fbRewardedVideoAd = new RewardedVideoAd(ctx, "YOUR_PLACEMENT_ID");
I simply stuck. Documentation says it is okay for testing but I should replace this with my real placement id which I absolutely cannot find no matter where I'm looking for it and the documentation also fails to state where should I look for it.
So where is this placement id? What is this at all?
Anyone can help?
You can find your placement ID under Monetisation Manager-Properties-Your application. (if you have already created the placement ids)
If you have not created you can create a property first(Link your application) and under it you can create ad space and then property ids.
The document is here - Facebook Business
I'm making a pair of website-based apps for both Android and iOS interfaces, and I'm struggling with a part of it. Perhaps you guys could help me out!
I'm using Android Studio and Xcode, and launching the website through WebKit and WK WebView respectively. It's super simple, just an app which calls a website into it directly. No external navigation, nothing but a full-page website. And this part is working great!
But I do have one problem! I don't want my users to get consistently logged out if they close the app, or after a few hours of not using it. I'd like it to stay logged in for them, or to automatically log-in when they use it.
The maker of the website has given me a way to do this through the URL.
Basically, my URL currently is set up like "https://URL.com/x/y/z" and it goes to the website, and that is great, but I need to set it up to be "https://url.com/x/y/z/[insert user's IMEI or UDID here]". That unique ID from their Android device will keep them logged in. I've tested it using my own device with my own IMEI and it works great, but obviously using one specific identifier for everyone will not work. I just need it to call the specific user's IMEI or UDID into the URL, to complete it.
How should I go about this?
I am assuming that you are talking about an Android app that visualizes a website in an activity. On Android, you can retrieve the device's IMEI OR MEID string by calling:
android.telephony.TelephonyManager.getDeviceId().
But be warned, this requires that you add a permission to your manifest:
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
You should inform your users why you are requesting this permission.
For iOS/Xcode, you can get the device UUID via UIDevice:
// Swift 4
let uuid = UIDevice.current.identifierForVendor!.uuidString
If you are targeting iOS 11 or newer, Apple introduced Device Check to get a device specific token. I personally haven't used it, but it sounds like it's use case is similar to what you're looking for.
Update:
From your comment, here is how'd you include it in the url string.
let urlString = "url.com/x/y/z/" + uuid
In order not to violate policy of Google AdMob AD, I add my physics phone to test device using Code A.
I get the device string "Samsung SM-J5008" of the physics phone using the following UI when I select a device to run the App.
I don't know whether the string "Samsung SM-J5008" is correct, and more the Google AD is still displayed even if I have added the code .addTestDevice("Samsung SM-J5008")
And More
I don't need to remove addTestDevice() when I publish my app, all physical phones will display AD except these physical phones who's name string listed in addTestDevice(), is it right?
Code A
val adRequest = AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("Samsung GT-I9268")
.addTestDevice("Samsung SM-J5008")
.build()
adView.loadAd(adRequest)
When you run the project, if you monitor the LogCat, you can find a similar line Use AdRequest.Builder.addTestDevice(“C04B1BFFB0774708339BC273F8A43708”) to get test ads on this device. Copy the device id and add it to AdRequest.
Note that this ID varies from device to device, By doing this, the test ads will be loaded instead of live ads.
In production you need to make sure that you removed addTestDevice() methods in order to render the live ads and start monetization.
If you are running admob ads on an emulator then there is no ID. just use the AdManager method and set it to TEST_EMULATOR like the logcat says. If you run on an actual device with usb debugging and watch the logcat, the ID will appear in there.You need to add device ID As :
String android_id = Settings.Secure.getString(this.getContentResolver(), Settings.Secure.ANDROID_ID);
String deviceId = md5(android_id).toUpperCase();
Log.i("device id=",deviceId);
I signed up for Google AdMob services recently and been using this code to create the AdRequest.
private AdRequest createAdRequest()
{
return new AdRequest.Builder()
.AddTestDevice(AdRequest.TestDeviceSimulator)
.AddTestDevice("0123456789ABCDEF0123456789ABCDEF")
.AddKeyword("game")
.SetGender(Gender.Male)
.SetBirthday(new DateTime(1985, 1, 1))
.TagForChildDirectedTreatment(false)
.AddExtra("color_bg", "9B30FF")
.Build();
}
When logging in today morning, I saw some impression (around 100) created obviously by myself. The TestDevice ID is of course not the correct ID because I was too lazy to find out the correct one.
Are the ads showing right now in my app "real" ads? Can I fix this by adding the correct device ID and will I see then inside App that the Ads are just "Demo"?
... Is there no "general testing-mode" ? I'm developing together with a friend and he has of course a different device ID...
Thanks in advance
You can add multiple device IDs, no problem:
.AddTestDevice("YOURDEVICEIDYOURDEVICEIDYOURDEVICEID")
.AddTestDevice("FRIENDSDEVICEIDFRIENDSDEVICEIDFRIEND")
.AddTestDevice("SOMEONEELSESOMEONEELSESOMEONEELSESOM")
Now your friends and you will see demo ads, all the rest will see real ads.
To get the device id you can start your app and check the logcat for an admob log that looks more or less like this:
05-20 20:27:20.888: I/Ads(32367): Use AdRequest.Builder.addTestDevice("BANANANAANANANANANANNANANANANANA") to get test ads on this device.
Just use this id as a parameter in the addTestDevice method then. See also this related admob question
i just want to know if this problem is server side...or i must fix something in my code...
onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory
I'm using admob with adwhirl to show ads in my android application.
If you are getting this error, then your code is correct. The issue is that AdMob does not always have an ad to return for every request. This may happen particularly if you have just registered your AdMob publisher ID, as it takes some time and multiple requests before the new ID starts returning ads.
Another reason your fill rate may be low is that you don't have AdSense backfill enabled, or you have filtered out some ads. Check your app settings to see if that is the case.
Finally, a test you can run to see if your AdWhirl code is implemented correctly is to request a test ad. You can do this by specifying test mode in AdWhirl:
AdWhirlTargeting.setTestMode(true);
If you get back a test ad, you'll know your code is working as intended.
One of the solutions you could try:
Some times this will happened if you changed language of your Android device to exotic language (Russian for example). Try to change it back to English and AdMob will find appropriate ad for you. Or you could go to the Google Settings->Ads->Reset advertising ID
I've just found that such error is shown if your AdMob account has been banned. But it works with a test device ID.
Note that this might happen aswell if you're using (forcing) a custom width and height for the banners.
You should use the ones that DOC states:
https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#play
If you set a custom width and height like:
new AdSize( 521,300 );
It's going to reply with the error you mentioned.
I know this was from long time ago, but here's something i did which solved this problem.
1. on your admob account, click on "manage settings" in the app you've created.
2. click on "edit".
3. under "Android Package URL:" leave blank, and then save settings.
*after you'll save, it'll show this box as "market://", which is fine.
I had this problem when using Rewarded Interstitial (beta).
Changing to Rewarded solved the problem.