admob ads doesn't show up using milkmangames extension in flash - android

I have made an app in flash for android and I have followed everything as said here: http://www.adobe.com/devnet/air/articles/admob-ane-android.html to show ads in my app, but the ads ain't showing up, if I place this code:
if(AdMob.isSupported)
{
AdMob.init("my publisher id");
}
else
{
trace("AdMob won't work on this platform!");
return;
}
AdMob.addEventListener(AdMobErrorEvent.FAILED_TO_RECEIVE_AD,onFailedReceiveAd);
function onFailedReceiveAd(e:AdMobErrorEvent):void
{
trace("Ad failed to load.");
}
AdMob.showAd(AdMobAdType.BANNER,AdMobAlignment.LEFT,AdMobAlignment.BOTTOM);
above all the other code nothing works anymore and if I place this code below all the rest code the app works but the ads never show up, does someone know how I can show my ads??

AdMob.isSupported will always return false if you're testing on the simulator. So you've to test on device to be able to test AdMob in general.

I manage to notice that milkmangames Admob ANE has some issues. Just out of the sudden no ads and i mean not a single ad is displayed under intervals of time. milkman games ads aren't displayed without notice. At first i thought it was google fault but unity ads are working perfectly. People are loosing serious amounts of money because of this.
Perhaps google is blocking ads for milkman games ANE?

I had a similar problem, and wrote to Milkman. They politely suggested I read the manual - GettingStarted.pdf, and sure enough, in there is a note about setting up your -app.xml properly.
You need to include certain manifestAdditions in the android section of -app.xml:
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application>
<!-- this meta-data tag is required for AdMob -->
<meta-data android:name="com.google.android.gms.version" android:value="4452000"/>
<!-- this activity is required for AdMob -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
</application>
</manifest>
]]></manifestAdditions>
</android>

Related

How to apply Admob code with real App id and unit id..?

I'm very new to Android and I want to launch my first application but I'm facing problem while I'm trying to apply AdMob code in my application.
When I check my code with test ad id it is working fine but when I'm using the same code with my real AdMob App id and Unit id this give me no add in my frame and the Logcat is showing me this.
19 5029-5216/com.example.aviralchauhan.demoplayer E/FA: GoogleService failed
to initialize, status: 10, Missing google app id value from from string
resources with name google_app_id.
2019-07-23 12:14:10.330 5029-5216/com.example.aviralchauhan.demoplayer E/FA:
Missing google_app_id. Firebase Analytics disabled 2019-07-23 12:14:10.336 5029-5216/com.example.aviralchauhan.demoplayer E/FA:
Uploading is not possible. App measurement disabled
As you suggested that this is duplicate question so can you please explain that it's really important to connect the application with firebase to show to ads in my application as I already told you test ads are working fine.
No, it is not really necessary to integrate Firebase with Google but it is recommended so as to get detailed statics over how the user acts over your app and their interaction with the app.
Now, the main topic: Why the add code is not working?
I am sure that you have something like this in your manifest.xml file:
<manifest>
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR_ADMOB_APP_ID"/>
</application>
</manifest>
There, the text YOUR_ADMOB_APP_ID must be replaced by a real ID which you will get by adding your app to the AdMob dashboard. Check this to get the real ID.
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
</application>
set on app AndroidManifest.xml file

Google Pay using Sripe : Getting an unexpected developer error in Android

I have Implemented google pay using stripe payment processor and it is in test Environment. When I used to test google pay with real card payment it shows a dialog box that
"Request Failed"
UnExpected developer error, Please try again later.
I am unclear why this error is showing. How to resolve these issue. Can Anyone help me out?
Manifest file
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="myproject"
android:roundIcon="#drawable/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>
More detailed information is shared in the logs. Make sure to remove any process/application specific filtering, since these logs emanate away from your application. If you filter using a keyword such as "wallet", you should be able to see more specific hints into your problem.
Let me know whether that helps.

Admob and facebook mediation

Its the first time I am integration ads in android. I have integrated Admob using google tutorial. Now, I want to use Admob Firebase with Facebook mediation.
I followed mediation tutorial but I haven't created a facebook app yet. Also, in tutorial, it says to compile .jar files but SDK files I downloaded are in .aar format. There is also 4 folders in downloadeded file (facebook-android-sdk-4.12.1). Which one should I use? I facebook Audience Network tutorial, it only guides us to use facebook Ads standalone by creating Placement Id's for facebook ads but I already have Admob Ad Unit Id. I didn't find any facebook tutorial for mediation.
Can someone explain to me the steps which I need to perform to enable facebook ads mediation after integration of AdMobs with firebase?
Firebase Admob Mediation ANE For Adobe Air
Google Firebase Admob Mediation Ane provides as3 api for flex and flash developer to integrate admob,unityads,inmobi,chartboost,vunlge and gdt into adobe air ios and android app ,support banner Ad,Interstitial Ad,Native Express Ad and Video ,not need java or oc.Support banner,Intersitial,native express ads,Video
Quick Start
Display firebase Banner Ads in as3
Admob.getInstance().showBanner("your banner id",AdmobSize.BANNER_320x50,AdmobPosition.BOTTOM_CENTER);
The AdmobPosition class specifies where to place the banner. AdmobSize specifies witch size banner to show
Remove Firebase Admob Mediation Banner
Admob.getInstance().hideBanner();
Show Admob Native Express Ads
Native express ads is a admob new ad format similar to banner,How to show native express ads in flash air ios and android application? it api similar to banner too.
Admob.getInstance().showNativeBannerAbsolute(nativeID,new AdmobSize(320,132),0,260);
nativeID is got from apps.admob.com format like ca-app-pub-3940256099942544/2562852117
AdSize is the value you set in apps.admob.com
Hide admob native banner
Admob.getInstance().hideNativeBanner();
Show multi banner or native banner at same screen.
if you want to show multi banner at same screen ,set the name of banner as follow.
Admob.getInstance().showBanner("your banner id",AdmobSize.BANNER_320x50,AdmobPosition.BOTTOM_CENTER,0,null,"bannerName1");
hide named banner
Admob.getInstance().hideBanner("bannerName1");
Admob ANE Show Interstitial
Admob.getInstance().cacheInterstitial("interstitial id");
interstitials need to be loaded before shown. show at an appropriate
stopping point in your app, check that the interstitail is ready before showing it:
if (Admob.getInstance().isInterstitialReady()) {
Admob.getInstance().showInterstitial();
}
Set Admob Target Param
set Admob target param such as test Ads and children app
If you want to test the ads or the your app with children target,you can set with admob ANE easy
extraParam=new ExtraParameter();
extraParam.testDeviceID="true";
extraParam.isChildApp=true;
Admob.getInstance().showBanner("banner ID",AdmobSize.BANNER_320x50,AdmobPosition.BOTTOM_CENTER,80,extraParam);
Handle admob events
Firebase admob ane supports all admob native event,you can handle as following
Admob.getInstance().addEventListener(AdmobEvent.onInterstitialReceive, onAdEvent);
private function onAdEvent(event:AdmobEvent):void
{
if (event.type == AdmobEvent.onBannerReceive)
{
trace(event.instanceName,event.data.width, event.data.height);
}
if (event.type == AdmobEvent.onInterstitialReceive)
{
Admob.getInstance().showInterstitial();
}
}
IOS permission config
NSAppTransportSecurity is required for ios 9,to allow http request,it is required to add NSAppTransportSecurity key
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Android permission config
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application>
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:exported="false"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="#android:style/Theme.Translucent"/>
<activity android:name="com.chartboost.sdk.CBImpressionActivity"
android:excludeFromRecents="true"
android:hardwareAccelerated="true"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<service android:name="com.qq.e.comm.DownloadService" android:exported="false" />
<activity android:name="com.qq.e.ads.ADActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
<activity
android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true"
/>
<activity
android:name="com.inmobi.rendering.InMobiAdActivity"
android:configChanges="keyboardHidden|orientation|keyboard|smallestScreenSize|screenSize"
android:hardwareAccelerated="true"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
tools:ignore="UnusedAttribute" />
<receiver
android:name="com.inmobi.commons.core.utilities.uid.ImIdShareBroadCastReceiver"
android:enabled="true"
android:exported="true"
tools:ignore="ExportedReceiver">
<intent-filter>
<action android:name="com.inmobi.share.id" />
</intent-filter>
</receiver>
<service
android:name="com.inmobi.signals.activityrecognition.ActivityRecognitionManager"
android:enabled="true" />
<activity
android:name="com.vungle.publisher.FullScreenAdActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"/>
</application>
</manifest>
]]></manifestAdditions>
</android>
ANE ID
<extensionID>com.google.firebase.admob</extensionID>
project home https://github.com/monumentichb/Firebase-Admob-Mediation-ANE

Android RevMob Can't Display Advertisement

When i integrated the RevMob into my application, it shows me the following error :
No ads for this device/country right now
Is there a way to solve that issue ?
Do you give permition in manifest<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
It means what it says. Revmob doesn't have any publisher for your country. Revmob has invested much in gaining developers rather than advertisers, thus they have lack of ads sometimes.
Just to check if you have done everything fine, try using VPN on your device for UK or US. They normally have ads for those countries.
To check the implementation you can use the test mode:
EnvironmentConfig.setTestingMode(true);
This is described on the sdk documentation http://sdk.revmob.com/android
It can be a temporary outage of campaigns for your device/country etc. It must be solved in the server/sales side automatically. But you can check your implementation using the testing mode, like Diogo said.
In the newest versions, you must use the following code:
RevMob revmob = RevMob.start(this, APPLICATION_ID);
revmob.setTestingMode(RevMobTestingMode.WITH_ADS);

admob compromising app

i'm making an app for android 2.2+ using facebook sdk too. my app is working fine and so before putting it on the market i decided to put some ads with admob. to use admob with previous version you have to compile with adnroid 32+ so that's what i did (i used api 15). in android 2.2-3.2 my app works and admob too, but in ICS (i'm testing it on a nexus with android 4.0.4) admob doesn't show any ads, some facebook requests give back a null result and some downloads of picture give error (i say "some" because other requests and other downloads of picture work..).
I'll post here the relevant parts of my manifest and the other two errors. if remove ads and compile my app to 2.2 it begins to work fine again...
in my project.properties:
# Project target.
target=android-15
my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
package="com.***.***"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="15"
/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:icon="#drawable/icon_transparent_zk"
android:label="***" >
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
here's the request for facebook (i need it to get the user id):
String result_me = mFacebook.request("me");
and now the image, i can assure you that the url contained in the json is correct:
URL img_value = new URL(json.getString("pic"));
Bitmap icon = BitmapFactory.decodeStream(img_value.openConnection().getInputStream());
if anyone could help me i'd really appreciate it! thank you
Ice cream sandwich (or even Honeycomb if I recall correctly) doesnt allow you to perform network operations on the main thread.
Perform your admob requests in a Thread object.
(new Thread() {
public void run() {
//Admob stuff
}
}).start();
This is to ensure you dont ANR your app on long network operations.

Categories

Resources