[OUTDATED][Free] Admob Extension - Add different types of AdMob ads in your application

Did u change app id once switching from test to live?

No I didn't change the app id.

So are you getting any kind of error, maybe from OnError event block?
Can you provide your application link in PlayStore?

Change it and you're good to go :upside_down_face:

I put my app id in SDK then I ran test ads, it was running fine, then I put add unit id and un-ticked the Test Ad, and then I published. that's it.

see android studio - "No Ad Config." on onAdFailedToLoad() Method While trying to Load Ads - Stack Overflow

No Adconfig errors arise in case app is using non-test ads and is not live on playstore

You can try your best to add 'appId' string so people no need to create extension :wink:

This is not possible as far as I know !
Compiling and adding extension is only way to write to manifest.

1 Like

ok ok its fine

1 Like

Thank you @oseamiya for this amazing exrtension thank you
Best Wishes for this NewYear
You have shared the best extension

Done @TIMAI2 sorry, i have not seen

3 Likes

@XPF_Support
Did you need to SHOUT !! ?
Using CAPS LOCK text in a post is considered to be shouting, please do not use this when posting on the community

3 Likes

Thankyou so much !
May the new year bless to you with health, wealth, and happiness !

Hope to finish my exam soon and continue developing more free extensions :slightly_smiling_face:

1 Like

I'm having this error, I've already created 3 different apps and used your aia file and the same error appears every time:

Runtime Error

A required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the element:
Note: You will not see another error reported for 5 seconds.

Dismiss

It seems you are not well informed. The original text was in all caps and he later changed it. So no need to respond for someone else if you don't know what happened. :wink:

3 Likes

Oh thanks! :wink:

So you are trying this on Companion? This extension doesn't work on companion as companion doesn't have required manifest.
It should work fine if you use as application.

2 Likes

Hello, I tested installing the app on my cell phone, but the error continued, I did the same as the video tutorial, but I analyzed your code and found where the problem was and now it is working correctly. Thank you very much for your support and attention.

1 Like

The error only come if you use companion or you don't have added and dragged AdmobSdk extension as service version is added on that extension's manifest. Code :

However, you can share how you solved the problem so that user with similar problem can look over to your solution.

You are welcome !

3 Likes

My Nitotron wont compile in the first place. Any ideas whats causing the porblem?

package admob.purplemango.admobid;

import android.app.Activity;
import android.content.Context;
import com.google.appinventor.components.annotations.*;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.runtime.EventDispatcher;
import com.google.appinventor.components.annotations.androidmanifest.*;
@DesignerComponent(
        version = 1,
        description = "",
        category = ComponentCategory.EXTENSION,
        nonVisible = true,
        iconName = "")

@SimpleObject(external = true)
//Libraries
@UsesLibraries(libraries = "")
//Permissions
@UsesPermissions(permissionNames = "")
@UsesApplicationMetadata(metaDataElements={@MetaDataElement(name="com.google.android.gms.ads.APPLICATION_ID", value="ca-app-pub-1058145014713648/6484169250")})
public class PurpleMango extends AndroidNonvisibleComponent {

    //Activity and Context
    private Context context;
    private Activity activity;

    public PurpleMango(ComponentContainer container){
        super(container.$form());
        this.activity = container.$context();
        this.context = container.$context();
    }

    @SimpleFunction(description = "Sample Function Generated by Niotron")
    public void TestFunction(){

    }

    @SimpleEvent(description = "Test Event Generated by Niotron")
    public void TestEvent(){
        EventDispatcher.dispatchEvent(this, "TestEvent");
    }
}



1 Like