[Android] Admob and Google Play Game Services Support

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: [Android] Admob and Google Play Game Services Support

Post by yetneverdone »

You are very awesome dude! Thank you for taking the time to port love2d for the android, not only that, but you also did the ad related stuffs. You are a hero for the indie dev community
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: [Android] Admob and Google Play Game Services Support

Post by yetneverdone »

Hey, since in tbis post youve said that the google play services lib is not needes anymore, does that mean that the aiki tutorial for the admob in your bitbucket repo is deprecated?
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: [Android] Admob and Google Play Game Services Support

Post by master both »

yetneverdone wrote: Mon Feb 20, 2017 8:50 am Hey, since in tbis post youve said that the google play services lib is not needes anymore, does that mean that the aiki tutorial for the admob in your bitbucket repo is deprecated?
Yes, the wiki tutorial is not needed in my repository, but since it's a fork, it is still relevant for the original repo and I try not to diverge a lot from it.
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: [Android] Admob and Google Play Game Services Support

Post by yetneverdone »

master both wrote: Fri Mar 31, 2017 2:46 am
yetneverdone wrote: Mon Feb 20, 2017 8:50 am Hey, since in tbis post youve said that the google play services lib is not needes anymore, does that mean that the aiki tutorial for the admob in your bitbucket repo is deprecated?
Yes, the wiki tutorial is not needed in my repository, but since it's a fork, it is still relevant for the original repo and I try not to diverge a lot from it.
Hi. Question: is your fork REALLY the same as the original, but with added features like the admob and google play services? If so, do you recommend for users to use your repo instead of the original?

Also, suggestion, would it be better if you would include a working apk with ad in it? For quick testing?
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: [Android] Admob and Google Play Game Services Support

Post by master both »

yetneverdone wrote: Fri Mar 31, 2017 10:45 am Hi. Question: is your fork REALLY the same as the original, but with added features like the admob and google play services? If so, do you recommend for users to use your repo instead of the original?

Also, suggestion, would it be better if you would include a working apk with ad in it? For quick testing?
Yes, my fork is exactly the same as the original with all the updates and all, but with the admob and google services implemented. As to what repo to use, It depends if you will use the admob and goggle services or not since my repo creates bigger apk files because of the google libraries.

Sure, I can make a demo for the repo, but if you want to test it now, there are a lot of game on the play store that use my repo for ads, just search for "love2d".
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: [Android] Admob and Google Play Game Services Support

Post by yetneverdone »

master both wrote: Fri Mar 31, 2017 3:54 pm
yetneverdone wrote: Fri Mar 31, 2017 10:45 am Hi. Question: is your fork REALLY the same as the original, but with added features like the admob and google play services? If so, do you recommend for users to use your repo instead of the original?

Also, suggestion, would it be better if you would include a working apk with ad in it? For quick testing?
Yes, my fork is exactly the same as the original with all the updates and all, but with the admob and google services implemented. As to what repo to use, It depends if you will use the admob and goggle services or not since my repo creates bigger apk files because of the google libraries.

Sure, I can make a demo for the repo, but if you want to test it now, there are a lot of game on the play store that use my repo for ads, just search for "love2d".
I mean, just an apk that shows an ad. Not a game or what. Also, with that having a companion .love file so users could easily see how it does work and easily implement it. Or maybe just write a comprehensive and up-to-date wiki or instructions just like any other libraries.
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: [Android] Admob and Google Play Game Services Support

Post by yetneverdone »

master both wrote: Sat Apr 23, 2016 4:29 pm Hi! since my old post on LÖVE-Android got locked, I have change my Bitbucket account, so the current links are broken, that's why I have decided to repost it here:

You can get the repository here:
https://bitbucket.org/npinochet/love-android-sdl2

For getting this to work you will need to add google-play-services_lib to your project, which I can show you how.
(Not any more!! :awesome: )

I added 14 new functions to love.system:
Admob Functions:
  • Banners:
    • •love.system.createBanner("Banner ID", "orentation", "size") where orentation can be "top" or "bottom" and "size" is a string with an AdSize Constant.
      •love.system.hideBanner() removes the banner from the screen.
      •love.system.showBanner() makes the banner reappear.
    Interstitials:
    • •love.system.createInterstitial("Interstitial ID") create the interstitial ad.
      •love.system.isInterstitialLoaded() check whether there is an ad loaded and ready to be shown.
      •love.system.showInterstitial() show the ad.
Google Play Game Functions:
  • •love.system.googlePlayConnect() Initialize the Google Play Game Services and promts the sign in dialog.
    •love.system.googlePlayDisconnect() It does what you think it does.
    •love.system.isGooglePlayConnected() Return whether the user is sign in or not.

    Achievements:
    • •love.system.unlockAchievement("achievements ID") "achievement ID" is the id generated at the Google Play Dev Console.
      •love.system.incrementAchievement("achievements ID", howmuch) This is for procedual achievements.
      •love.system.showAchievements() Shows the Achievements screen.
    Leaderboards:
    • •love.system.submitScore("leaderboard ID", score) "leaderboards ID" is generated at the Google Play Dev Console.
      •love.system.showLeaderboard("leaderboard ID") Shows an especific leaderboard screen.
      •love.system.showAllLeaderboards() Show a screen with all the leaderboars were the user can choose one.
Some Notes:
•If you want to use Achievements and Leaderboards, you will have to go to "love-android/res/values/ids.xml" and change the number there for your own App ID.
•You can get a "Banner ID" or "Interstitial ID" on the Admob website, they look like this:
ca-app-pub-9796530573307706/1938301675.

Now you can have full control of Google Play Services on lua!

Here you can see all the changes to the oficial love-android repository:
https://bitbucket.org/npinochet/love-an ... dl2:master

Thanks to bio1712 for making this possible :)

If anyone finds a bug or would like a feature to be added, just let me know ;)
Questions, is the love.system.showBanner() need to be called in the love.load() only? Or must it be updated?
Also, any plan to include firebase for debugging?
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: [Android] Admob and Google Play Game Services Support

Post by master both »

yetneverdone wrote: Mon Apr 03, 2017 6:35 am Questions, is the love.system.showBanner() need to be called in the love.load() only? Or must it be updated?
Also, any plan to include firebase for debugging?
The love.system.showBanner needs to be call only once, it doesn't need updating :) As for firebase, I have never used it, I'm not even sure what it does to be honest heh, but I'll look into it when I have time.
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: [Android] Admob and Google Play Game Services Support

Post by yetneverdone »

master both wrote: Tue Apr 04, 2017 2:18 am
yetneverdone wrote: Mon Apr 03, 2017 6:35 am Questions, is the love.system.showBanner() need to be called in the love.load() only? Or must it be updated?
Also, any plan to include firebase for debugging?
The love.system.showBanner needs to be call only once, it doesn't need updating :) As for firebase, I have never used it, I'm not even sure what it does to be honest heh, but I'll look into it when I have time.
So that applies to the interstitial right? Firebase is like the analytics for admob.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: [Android] Admob and Google Play Game Services Support

Post by master both »

yetneverdone wrote: Tue Apr 04, 2017 6:49 amSo that applies to the interstitial right? Firebase is like the analytics for admob.
Yep, that applies to interstitials too.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests