Join us on Discord!
You can help CodeWalrus stay online by donating here.

Abmob on Android

Started by gameblabla, November 06, 2016, 07:11:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gameblabla

Has anyone here got Admob to work on Android ?
Well, since they released the new version in 2014, i didn't.
Does anyone uses Abmob here ?

My game is an SDL2 app and it has its own Activity, SDLActivity.Java.
Here's my Admob code :
...
        if(Build.VERSION.SDK_INT >= 12) {
            mJoystickHandler = new SDLJoystickHandler_API12();
        }
        else {
            mJoystickHandler = new SDLJoystickHandler();
        }

        mLayout = new AbsoluteLayout(this);
        mLayout.addView(mSurface);

// Create a banner ad. The ad size and ad unit ID must be set before calling loadAd.
mAdView = new AdView(this);
mAdView.setAdSize(AdSize.BANNER);
mAdView.setAdUnitId("adunitid");

// Create an ad request.
AdRequest.Builder adRequestBuilder = new AdRequest.Builder();

// Optionally populate the ad request builder.
adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);

// Add the AdView to the view hierarchy.
mLayout.addView(mAdView);

// Start loading the ad.
mAdView.loadAd(adRequestBuilder.build());

setContentView(mLayout);


I also added the following in their respective places :
..
public class SDLActivity extends Activity {
    private static final String TAG = "SDL";
    private AdView mAdView;

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.*;


Sadly, the ad in question does not appear.
(not even an error saying it is misconfigured or anything)

How do you put ads on Android ?
Does anyone here even do it ?
  • Calculators owned: None (used to own an Nspire and TI-89)

Dream of Omnimaga

I haven't seen anyone here using ads in their Android programs, but I did use some from elsewhere that did before. I can't help, though, since I never heard of Ambob until I read this topic.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

gameblabla

#2
Thanks DJ, it really sucks tho.
Last month, i stopped earning money from Rubby Bird (about 100€ each month)... and i have no way to bring back those ads !
Does anyone know a place where i can ask for support ?
Stackoverflow won't do it unfortunely...

EDIT: I have published my build system to the Android port (as well as the source code) :
it's here :
https://github.com/gameblabla/rubbybird100/tree/master/Android_version
I do not have much to lose at this point so...

EDIT2: It seems that Ads do not work on my devices... lol
In fact, some of them even crashes unlike my games.
I need to investigate but so far, this isn't good.

EDIT3: i modified it a bit on my devices and now i can see those errors.
Still no test or real ads tho..
Since i don't get ads from all apps on my devices as well,
i just assume it should work just fine on all the other devices so i tried it with Rubby Bird
and pushed an update.

I will let you know if that works.
  • Calculators owned: None (used to own an Nspire and TI-89)

Dream of Omnimaga

How were you earning money? From ads? Or did people just stop buying your games or something? I forgot if they were all free or not. It's nice you managed to earn this much, though.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

gameblabla

Quote from: DJ Omnimaga on November 08, 2016, 12:27:50 AM
How were you earning money? From ads? Or did people just stop buying your games or something? I forgot if they were all free or not. It's nice you managed to earn this much, though.
Well when Rubby Bird was at its peak, i could earn up to 5$ a day from ads alone. But most of the time, it was 2$ a day.
But my app got flagged by Google because it suffered from the libpng vulnerability and people started to uninstall the game en-masse.
Seriously, it went from 16,000 active installs last month to 5000 active installs, it dropped really fast.
And since the old Admob used by Rubby Bird was discontinued, i no longer earn money from it now.

I just pushed an update that fixes the vulnerability (and the ads) but Google blocked the update, saying it is vulnerable,
even tho i had clearly deleted the libpng shared library.
So now i appealed to Google and we'll see how it goes...

  • Calculators owned: None (used to own an Nspire and TI-89)

gameblabla

Well good news guys, the ads on Rubby Bird are now back to giving me revenue again !
The solution ? Well, it was my code after all, put this after setContentView(mLayout) :
AdView adView = new AdView(this);
adView.setAdUnitId(myid);
adView.setAdSize(AdSize.BANNER);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.build();
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
params.addRule(RelativeLayout.CENTER_HORIZONTAL);
adView.loadAd(adRequest);
adView.setBackgroundColor(Color.TRANSPARENT);
mLayout.addView(adView, params);


Now the ads properly shows up and users can click on it.
Another i had to do tho was to reprogram the game from scratch and switch from BennuGD to C and use Gradle instead of the now-unsupported Ant.
  • Calculators owned: None (used to own an Nspire and TI-89)

p2

nice. glad to hear you could fix it :) how much do you expect to make per month (now after its fixed)? :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

gameblabla

Quote from: p2 on November 30, 2016, 05:05:30 PM
nice. glad to hear you could fix it :) how much do you expect to make per month (now after its fixed)? :)
At Rubby bird's peak, i used to earn 100$ a month.
Recovery is going to be a little slow so i estimate i will probably earn 12$ a month.
  • Calculators owned: None (used to own an Nspire and TI-89)

Dream of Omnimaga

I'm very late @gameblabla but you should feel glad that you earned $100 a month or might earn $12, because the max I made from music in my peak years was around $60 in a month and I sometimes make less than that in an entire year (although now it kinda went up again). And of course, it's actually less than $60 for sure because it costed me about $105 a year to keep three of my albums on iTunes/Spotify/etc before I pulled them out.

I also wonder if EasyRPG can be bundled with games that are ported to Android or if it's just an emulator where you select an RPG Maker game, because it would be nice if I could release my game on Android when finished and maybe put ads in it :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

Quote from: DJ Omnimaga on March 07, 2017, 03:53:35 AM
I also wonder if EasyRPG can be bundled with games that are ported to Android or if it's just an emulator where you select an RPG Maker game, because it would be nice if I could release my game on Android when finished and maybe put ads in it :P
The licence permits you to sell your game with EasyRPG as long as you publish your changes to the engine, if any. If you can bundle EasyRPG with your game on Android, that's another story and something to investigate.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

gameblabla

#10
Quote from: DJ Omnimaga on March 07, 2017, 03:53:35 AM
I'm very late @gameblabla but you should feel glad that you earned $100 a month or might earn $12, because the max I made from music in my peak years was around $60 in a month and I sometimes make less than that in an entire year (although now it kinda went up again). And of course, it's actually less than $60 for sure because it costed me about $105 a year to keep three of my albums on iTunes/Spotify/etc before I pulled them out.
I'm sorry but it's really stupid for an indie to put their songs on iTunes due to the insane amount of money Apple asks you.
Plus, it's overcrowded and it's just hard to get noticed by anybody.
Artists have other alternatives now though, thankfully.

DJ, i'm complaining because it's my only source of revenue. I don't get any money anywhere else.
Unfortunately, people on mobiles are cheap bastards that have no problems having their calendars being spied on
but complains as soon as the game costs 0,99$.

On the other hand, the very same people are ready to shell out 500$ just for a simple Wordpress website made in one day !
(which is currently what i hope i will be doing, someone is already interested)

In this day and age, i think it's stupid to think that you can make money from games.
All you will end up doing is spend more money on more drama and f***ing trash.

EDIT: Also, like juju said, license allows that as long as you release the source code.
However, you may have to modifiy EasyRPG's source code so that it points to the internal APK and start the game from there.
It's possible but requires you to be able to compile the source, build it, sign it etc...
  • Calculators owned: None (used to own an Nspire and TI-89)

Yuki

Capitalism is kinda weird, indeed, but eh, that's how it works. I work in that field and people and companies will indeed hire someone to do their website if they don't know how to do it themselves and/or have studied in design. Of course, you can just take a free Wordpress hosting, but some people have special needs only a web designer can do. There's a lot of demand in programming/design.

Money for games, yeah, I kinda agree with you, some kids don't want to ask their parents for app money. Actually, there's a bit of a difference: people are ready to shell out $1000 for a website because they need it for their company, but they often don't want to pay for these apps because they don't really know the developer, it's not popular enough, they don't need it, or they can't pay for it and they'll probably prefer buying some food instead. Or the new Zelda you know every critic unanimously said it's the best game ever. It's a bit of a catch-22.

For EasyRPG, seems the code is already there, but they didn't documented it because it's not stable yet, as of a few months ago. Shouldn't be that hard to build it with the game.

https://community.easyrpg.org/t/apk-with-game-builded-preloaded-inside/294/2
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

@gameblabla I actually made 9 times more money from A Decade of Magic Hardcore on iTunes+other big sites than I did on the free of charge Bandcamp website. It might be stupid to put music on iTunes as indie due to how much it costs and how much they keep for themselves, but your stuff get a considerable amount of exposure there if it's electronic music. However, for all my other albums I made more Money on Bandcamp because most people who uses iTunes or other big distributors only care about hip hop, dance and pop music.

As for music, making a lot of money as indie artist is a full time job as much as it is to work full time at Walmart, if not more, and it still won't even pay close to as much as Walmart. You need to spend 50 hours a week non-stop on social media to promote your stuff, interact with fans, create merch for sale and more importantly, you also need to tour and play live gigs.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

p2

Pleeease tell me you are currently spoilering us on your plans for this summer O.O
I will sooo much come to ur live gig  :love:
Even if I had to come to canada for it  :thumbsup:
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

Lol no I won't play live <_<
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal