Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › AdMob

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #6485

    Felgo User

    Hello, i want to use AdMob, but console says ReferenceError:

    file:///Users/xxx.app/Contents/Resources/qml/GameOverScene.qml:47: ReferenceError: Can't find variable: AdMob

    Or is it impossible to build on desktop? :-/

    AdMob:

          AdMob {
                id: admob
                publisherId: system.isPlatform(System.Android) ? "ca-app-pub-x" : "ca-app-pub-x"
                testDeviceId: "450xx"
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.bottom: parent.bottom
                banner: AdMob.Standard320x50 // ReferenceError: Can't find variable: AdMob
    
                onInterstitialReady: {
                    showInterstitialIfLoaded()
                }
    
                onFailedToLoadInterstitial: {
                    console.log("Interstitial not loaded!")
                }
    
                onFailedToLoadAd: {
                    console.log("Banner not loaded!")
                }
            }

    How can i solve this?

    #6492

    Alex
    Felgo Team
    #6513

    Felgo User

    ok now i have another problem.

    i tested the admob and i got an error in LogCat Console:

    01-24 19:17:59.653: E/ActivityThread(4616): Failed to find provider info for com.google.plus.platform
    01-24 19:18:00.473: E/Ads(4616): JS: Uncaught ReferenceError: AFMA_getSdkConstants is not defined (http://media.admob.com/:1)
    01-24 19:18:00.473: E/Web Console(4616): Uncaught ReferenceError: AFMA_getSdkConstants is not defined at http://media.admob.com/:1
    

    Internet Connection is available (WLAN)

    have you seen this before? solution? 🙁

    #6522

    Felgo User

    Now i tested on my iPhone 5s.

    i get the Smartbanner on the right position (in testmode and livemode)

    But if i want to user a Interstitial (FullScreen) the console (Xcode) says:

    //    Jan 25 16:18:43 Noname-Corp GrumpyDude[14138] <Warning>: <Google>
    //    Unable to set adSize property with kGADAdSizeInvalid.
    //    Please use one of the standard ad sizes or create a custom ad size using GADAdSizeFromCGSize.
    

    my AdMob Item:

        AdMob {
            id: admob
            publisherId: admobFullScreenPublisherId
            testDeviceId: admobTestDeviceId
            banner: system.debugBuild ? 0 : AdMob.None
            z:11111
            onInterstitialReady: {
                nativeUtils.displayMessageBox("onInterstitialReady")
                showInterstitialIfLoaded()
            }
    
            onFailedToLoadInterstitial: {
                nativeUtils.displayMessageBox("Interstitial not loaded!")
                console.log("Interstitial not loaded!")
            }
    
            onFailedToLoadAd: {
                nativeUtils.displayMessageBox("Banner not loaded!")
                console.log("Banner not loaded!")
            }
        }

    Can anyone help me with that problem?

     

     

     

    #6525

    Christian
    Felgo Team

    Hi,

    we’ll investigate these issues beginning next week, thanks for reporting it!

    Cheers, Chris

    #6536

    Felgo User

    UPDATE:

    Android: i tested with an signed – aligned – released APK and i get following errors:

    01-26 14:26:22.087: E/Ads(11775): JS: Uncaught ReferenceError: AFMA_getSdkConstants is not defined (http://media.admob.com/:1)
    01-26 14:26:22.087: E/Web Console(11775): Uncaught ReferenceError: AFMA_getSdkConstants is not defined at http://media.admob.com/:1
    ....
    01-26 14:28:21.053: E/ActivityThread(11775): Failed to find provider info for com.google.plus.platform
    01-26 14:28:21.114: I/Ads(11775): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_getSdkConstants();AFMA_buildAdURL({"preqs":2,"session_id":"15732251384744564425","seq_num":"3","slotname":"ca-app-pub-2913891213130580\/5127039358","u_w":533,"msid":"at.pholly.GrumpyDude","cap":"m","js":"afma-sdk-a-v6.4.1","bas_off":0,"net":"wi","app_name":"1.android.at.pholly.GrumpyDude","hl":"de","smart_w":"full","gnt":0,"u_audio":1,"u_sd":1.5,"ms":"1uejwZOpV2DE6L5w-HKHbwckKqWKPdntv3p6NYh628gM3fhUfm9JQgIl_YYiFC8IC82J2tDDf4Z_aZ7HyUwaznB4zCgpnA3yeQtzs1wcHRKEACGi-y_rN8q8KHkyDF3nAy0lwnwEYlzWHX-MF51S4WXlcL3G7MlyIXgKmSeIjT-Wf-QWnzY40Kz_NFJ7Dsm_Jmt7HnqBEA41h7bUrSxNUBdSBQZlC_la4ecqcjeucxLHGyfx71zTYa_rIW2XIe3BOjTuvDrfGCNGj3cpljPPksgafnaafHm6g1pBHjYt97qMoe_4_loy5LhXoQCIqyB-gCL_5wesqGex7SXp5-IVbg","mv":"80250010.com.android.vending","isu":"5B75C13E95B1007022EE03D9EF304F70","format":"533x32_mb","oar":0,"smart_h":"auto","ad_pos":{"height":0,"visible":0,"y":0,"x":0,"width":0},"u_h":320,"pt":1,"bas_on":0,"ptime":120086});</script></head><body></body></html>
    01-26 14:28:21.284: E/Ads(11775): JS: Uncaught ReferenceError: AFMA_getSdkConstants is not defined (http://media.admob.com/:1)
    01-26 14:28:21.284: E/Web Console(11775): Uncaught ReferenceError: AFMA_getSdkConstants is not defined at http://media.admob.com/:1
    01-26 14:29:21.082: I/Ads(11775): AdLoader timed out after 60000ms while getting the URL.
    01-26 14:29:21.092: D/webviewglue(11775): nativeDestroy view: 0x20899a8
    01-26 14:29:21.092: I/Ads(11775): onFailedToReceiveAd(A network error occurred.)
    

     

    iOS: Fullscreen: same error like in post above: https://felgo.com/developers/forums/t/admob/#post-6522

     

    pls fix this ASAP…

     

     

    #6549

    Felgo User

    UPDATE2:

    Smartbanner works on my iPhone 5s, iPad 2, Samsung galaxy 10.1 BUT NOT on HTC Desire S (Error above)

    Fullscreen Interstitial wont work on any device:

    Jan 25 16:18:43 Noname-Corp GrumpyDude[14138] <Warning>: <Google> Unable to set adSize property with kGADAdSizeInvalid.
    Please use one of the standard ad sizes or create a custom ad size using GADAdSizeFromCGSize.

     

    any ideas, fixes?

    #6553

    Alex
    Felgo Team

    Hi,

    I just checked your demo code posted above and I’m not 100% sure what you’re trying to achieve (i.e. which banner you want to display or where you are triggering the interstitial view)? Could you please post (or send) a full example (including GameWindow and Scene) which is not working for you? As a reference, we also included an AdMob sample in the SDK under examples/AdmobTest, probably you can give this one a try too?

    Thanks,

    Alex

    #6560

    Felgo User

    ok, it works now!

    banner: AdMob.None wont work. (Doku: AdMob.None – No Banner is displayed. Use this, if you only want to use Interstitials.)

    Now i used banner: AdMob.Smart and it works.

     

    But is there any function like admob.hideInterstitial() to hide the Intersititial?

    Or a eventListener like onClosedInterstitial?

    #6562

    Alex
    Felgo Team

    Hi,

    thanks for the hint with the misleading documentation, to get an overview of your initial problem, did you try to start with a banner of None and then later on switch it to another banner value?

    Regarding the admob.hideInterstitial() there is currently no signal available but we can try to implement something similar into our plugin bridge directly. What would be your use case for connecting to this signal?

    Best,

    Alex

    #6563

    Felgo User

    Hey Alex.

    but hideInterstitial() is not avail able yet?

     

    i want to use it for the gameOver screen, if the user clicked “restart” the Interstitial should open, and if the user hit “X” the game should restart (window.state = “game”)

    if i do window.state = “game” while the Interstitial is open, and the user clicked “X”, the GameWindow lost focus.. can’t click anything.

Viewing 11 posts - 1 through 11 (of 11 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded