Author Topic: ongoing implementation of Admob and various other service  (Read 2646 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1691
    • View Profile
Space Fractal:

Im diddent split this thread correctly, but its was me that tried to property implements admob to glbasic, so we could use java calls to show the ads. Its turned out its was impossible to call java that ways, but required to been inside the Activity. So im have chosen to remove it again and let the original MrPlow implemented stays as its was 100% legit post about it and possible way.

-------------

Thanks SF

I will try your file!!

Also updated steps above to include dependancy for build.gradle file.
« Last Edit: 2020-Feb-16 by spacefractal »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1691
    • View Profile
Re: Failed implementation of Admob
« Reply #1 on: 2019-Nov-21 »
Hi SF,

That dropbox link doesn't work.

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #2 on: 2019-Nov-21 »
property happens when im did updated the file a little bit. fixed.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4158
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Failed implementation of Admob
« Reply #3 on: 2019-Nov-21 »
Cheers Mr Plow (and of course SpaceFractal) :)
I came. I saw. I played.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1691
    • View Profile
Re: Failed implementation of Admob
« Reply #4 on: 2019-Dec-02 »
Hi SF,

Just wondering if you have been able to get the ads.show() method to run and advert within the SDL game loop process yet?

I would really like to get this working so I can use ads between levels / stages etc.


Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #5 on: 2019-Dec-05 »
its untested and havent tested it under my apss or something like that, just some java code here. The main issue is how the main activty works and the admon works as its should pause the main activty before shows the ads.

You do should get some logs if you have called it correct.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #6 on: 2020-Feb-08 »
Please, dont post PM about admob and such thing. Im is gonna to been quite tired of it to use the time of it. So dont PM me about this. thanks. Im will no longer reply PMS like this.

Use the forum and this thread. Nobody example reported im has uploaded a wrong file and newer mention it. Howover has uploaded a new java file, check it out in the edited post. Its still untested throught.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1691
    • View Profile
Re: Failed implementation of Admob
« Reply #7 on: 2020-Feb-08 »
Hi SF,

No worries, I wont send anymore PMs - I tried the new code file - but I will need to check that javacall is firing...

You see there is a problem in that the SDL process is not allowing admob to interrupt SDL, unless the user leaves app (switches to another app) or does playstore visit within the app...only then is the admob adverts firing.

So it's more than the just the code to manage - i need a way to signal to app that an interrupt has occured - if even that works then I can get ads to show when I need them.

:)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #8 on: 2020-Feb-08 »
nothing problem to do its here as others might have issues and how to do, not just you.

glbasic should send a pause/resume signal to close down the activity and reactivate. can you post the log (im have log anything here for checkout its has been reach or stopped). here as its would shown what its happens. This is what Log.i() do to your logcat.

This was happens automatic in the old code without im did anything, which was quite annoying. Its might even could been a androidmanifest.xml issue.

For use with testing ads, you should uses the unit ID: ca-app-pub-3940256099942544/1033173712

Im also updated the SDLActivity post again, so ads_load could been handled automatic on init and soon a ads is closed. This was in hand with the official code, so im did that.

If there is still issue with the SDL and ads actuelly does working, then its property a issue in if (tokens[0].equals("ads_show")) in SDLGlbasic.java me thinks that does not callback correctly and/or something is missing in the manifest file.
« Last Edit: 2020-Feb-08 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #9 on: 2020-Feb-09 »
you can try to add this to the androidmanifest.xml:

Code: (glbasic) [Select]
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />

thinks this was similar to the old one, and can been why the sdl activty could not been paused.....
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #10 on: 2020-Feb-09 »
Im got it working with test ads as least, so im will update it once more. Its just a little bit too aggresive, because im shown it when a ads is loaded. Howover its might not works in a emulator and might fails throught, but worked on a device.

Im do also need to change how the directories is finding as some commands has been depreacted in Android_Q.
« Last Edit: 2020-Feb-09 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #11 on: 2020-Feb-09 »
checkout the update. this is TESTED and worked on a device, but not on emulator (network fails while loading, but the adslistener did works as intended).

Also there is not much glbasic code to been required, other than the JavaCalls to shown them and eventuelly react to the pause/resume subs. So this is why im dont have or require to add any glbasic code as admob implemention would been different from game to game.
« Last Edit: 2020-Feb-09 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1691
    • View Profile
Re: Failed implementation of Admob
« Reply #12 on: 2020-Feb-09 »
Thanks SF

I will use your full SDLGlbasic.java file then...just to make sure I used it correctly... :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #13 on: 2020-Feb-09 »
im do first can implemenents this to steam when found a way to automatic filter the admob off and on as im did in glbasic 15 when the icon builder could detect it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Failed implementation of Admob
« Reply #14 on: 2020-Feb-10 »
There was some copy assets issues when reading from a wrong place, which is also now just fixed.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.