I recommend that you use this one instead: https://love2d.org/forums/viewtopic.php ... 6&p=214482
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
(Not any more!! )
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.
- •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.
- •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.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.
- •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.
- •love.system.unlockAchievement("achievements ID") "achievement ID" is the id generated at the Google Play Dev Console.
•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