nboy1 / Admob-for-Flash-ANE-GMA21-GLM-

Admob for Flash ANE GMA21 (GLM) "adobe air native extension"
5 stars 0 forks source link

Error creating files #4

Closed hohocb closed 1 year ago

hohocb commented 1 year ago

Hello bro... i just saw from your repo if you update the latest ANE file for Admob. I've tried it already, but when i'm gonna publish the file from Adobe Animate, it shows an error like this. I'm using air 50.0.1.2 btw, thanks in advance and i'm waiting for your reply

image

nboy1 commented 1 year ago

Hi @hohocb , can you provide me with more details about the issue ? did you updated the code from the old lilili87222 ANE to this new ANE or you still using lilili87222 code? if you can paste to me the code you are using please. and be sure that you integrated the ANE inside Adobe Animate . and be sure that you added the "Android permission config" too to the xml.

hohocb commented 1 year ago

Here is my as code which im using to test Ads, but its showing an error when publishing.

package { import flash.display.; import flash.net.; import flash.utils.; import flash.events.; import flash.text.; import ori.; import flash.system.; import code.; import flash.desktop.; import flash.filesystem. import com.glm.admob.*;

public class loader extends MovieClip
{
    var obj:Object;
    var request:URLRequest;
    public var mc:MovieClip;
    public var info:MovieClip;
    public var notice:MovieClip;
    var context:LoaderContext;
    var startTime:int;
            var framesNumber:int = 0;
            var num:int = 0;
    var so:SharedObject;

    public function loader()
    {
        super();
        stage.scaleMode = StageScaleMode.EXACT_FIT;
        NativeApplication.nativeApplication.executeInBackground = true;
        NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
        obj = new Object();
        obj.loader = new Array();
        obj.url =  new Array();
        obj.number = new Array();
        obj.content = new Array();
        obj.min = 1;
        obj.max = 0;
        obj.maxed = 100;
        obj.currentNumber = 0;
        so = SharedObject.getLocal("loader");
        num = so.data.number = "number" in so.data ? so.data.number : 1;
        addFrameScript(0, mainPanel);
        return;
    }

    function initAdmob():*
    {
        Admob.Ads().ShowAppOpen("this my app id");
        Admob.Ads().ShowAdaptiveBanner("this my banner id", "TOP");
        Admob.Ads().TAG_FOR_CHILD_DIRECTED_TREATMENT(false);
        Admob.Ads().TAG_FOR_UNDER_AGE_OF_CONSENT(false);
        Admob.Ads().TAG_FOR_MAX_AD_CONTENT_RATING("MA");
        return;
    }

    function mainPanel():*
    {
        stop();
        info.gotoAndStop(1);
        notice.gotoAndStop(2);
        mc.mixed.page.text = obj.min + " / " + obj.max;
        mc.mixed.prev.addEventListener(MouseEvent.CLICK, clik);
        mc.mixed.next.addEventListener(MouseEvent.CLICK, clik);
        mc.mixed.prev.buttonMode = true;
        mc.mixed.next.buttonMode = true;
        initAdmob();
        return;
    }
    }

}

Also, i'm already add permissions in xml file like u do

image

And this inside of my Animate setting

image

hohocb commented 1 year ago

nevermind bro...its my mistake, i lost my android adt path and its solved after i found solution in other site. btw thank you for making this ANE file with new GMA version and good work, the ads showinf perfectly in my app :)

nboy1 commented 1 year ago

sorry for late reply i wasn't free this days, glad to know that you solved the issue. thank you too, good luck man.

nboy1 commented 1 year ago

@hohocb just one notice, it's better to set:

Admob.Ads().TAG_FOR_CHILD_DIRECTED_TREATMENT(false); Admob.Ads().TAG_FOR_UNDER_AGE_OF_CONSENT(false); Admob.Ads().TAG_FOR_MAX_AD_CONTENT_RATING("MA");

before requesting ads:

Admob.Ads().ShowAppOpen("this my app id"); Admob.Ads().ShowAdaptiveBanner("this my banner id", "TOP");

so it will be:

Admob.Ads().TAG_FOR_CHILD_DIRECTED_TREATMENT(false); Admob.Ads().TAG_FOR_UNDER_AGE_OF_CONSENT(false); Admob.Ads().TAG_FOR_MAX_AD_CONTENT_RATING("MA"); Admob.Ads().ShowAppOpen("this my app id"); Admob.Ads().ShowAdaptiveBanner("this my banner id", "TOP");

have a nice day my friend.

hohocb commented 1 year ago

Aight thanks for your advice bro, i'm appreciated it