Packaging an android game with ads for play store on an android device

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Gunroar:Cannon()
Party member
Posts: 219
Joined: Thu Dec 10, 2020 1:57 am

Packaging an android game with ads for play store on an android device

Post by Gunroar:Cannon() »

Pls note: This question is a little all over the place, thnk you.
Hey, so I'm pretty confused on how to package an android game with ads. I have looked into it before making this post, I've seen admob, and from there I figured that I need to mess with the apk files of löve or something like that(which...confuses me, should I sign up somewhere on google for something to get ids and other info?), so then I thought of compiling and I saw apktool doesn't work anymore and does that method even build a sign apk? Does it use löve for android to build the apk? (Pls note, I'm a little confused in this whole command line thing, I go there but not very much so bear with my ignorance).
Then i saw this which seems easy,(plus I get to do it on the tablet I use to make/test the game). Does that work, because I'm inclined to do so, and if it does can I still add ads there? Do I have to write the manifest file or it's generated so I just have to order it? And will the app be signed, or is this a bad idea and should I do something else?

EDIT: there's also this for android, just incase.
Last edited by Gunroar:Cannon() on Fri Feb 19, 2021 11:59 am, edited 2 times in total.
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow
User avatar
Gunroar:Cannon()
Party member
Posts: 219
Joined: Thu Dec 10, 2020 1:57 am

Re: How to package an android game with ads for play store

Post by Gunroar:Cannon() »

Anyone have the link for this build (android admob lib), pls? It doesn't work, help :cry: https://love2d.org/forums/viewtopic.php ... 4f220e31c0.
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow
User avatar
ohai
Prole
Posts: 20
Joined: Thu Jan 21, 2021 9:06 pm

Re: How to package an android game with ads for play store

Post by ohai »

Gunroar:Cannon() wrote: Sat Feb 06, 2021 1:41 pm Hey, so I'm pretty confused on how to package an android game with ads. I have looked into it before making this post, I've seen admob, and from there I figured that I need to mess with the apk files of löve or something like that(which...confuses me, should I sign up somewhere on google for something to get ids and other info?)
In the thread you linked, there is a link to a bitbucket repo.
You need to clone it using git. If you are not comfortable with command line, I recommend GitExtensions as a sane Git GUI. (You will need to get acknowledged with command line sooner or later though IMO).
After doing that, you will have the source code on your PC. Now to build it into an APK, you need to either build it from the command line using gradle (as stated in the README.md file in the repo), or just use Android Studio (I recommend that approach for ease-of-use, although keep in mind it's quite heavy software).
To actually serve your ads, you would need to make an account on google admob, and to publish it on play store you need a $25 developer account.
User avatar
Gunroar:Cannon()
Party member
Posts: 219
Joined: Thu Dec 10, 2020 1:57 am

Re: How to package an android game with ads for play store

Post by Gunroar:Cannon() »

ohai wrote: Thu Feb 18, 2021 8:33 am
In the thread you linked, there is a link to a bitbucket repo.
You need to clone it using git. If you are not comfortable with command line, I recommend GitExtensions as a sane Git GUI. (You will need to get acknowledged with command line sooner or later though IMO).
After doing that, you will have the source code on your PC. Now to build it into an APK, you need to either build it from the command line using gradle (as stated in the README.md file in the repo), or just use Android Studio (I recommend that approach for ease-of-use, although keep in mind it's quite heavy software).
To actually serve your ads, you would need to make an account on google admob, and to publish it on play store you need a $25 developer account.
Thnx, but that's the thing, my pc is broken but I finished development on android and I've seen ways to develop the app there, and I know about the 25$ developer account and the admob account but I want to know how to put it in an app using that aide APK.
And aide seems likely to work, it's just that I'm bad at this whole building thing and the download link for his template and instructions in the site aren't that clear but they make sense. I downloaded the source code of love-for-android because the template looked like that a little like that but I get a parsing error because I did it incorrectly for the apk to be built.
Could someone please elaborate on how to make this work on android, I feel so close yet so far....:cry:

Apk link(not play store)
apk link(play store)
guide I saw
:monocle: :cry: :cry: :brows: :huh: :(
Attachments
Screenshot_2021-02-18-11-27-02.png
Screenshot_2021-02-18-11-27-02.png (198.06 KiB) Viewed 2952 times
Screenshot_2021-02-18-11-24-30.png
Screenshot_2021-02-18-11-24-30.png (219.45 KiB) Viewed 2952 times
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow
User avatar
ohai
Prole
Posts: 20
Joined: Thu Jan 21, 2021 9:06 pm

Re: How to package an android game with ads for play store

Post by ohai »

Unfortunately I don't have any experience of building on android for android, so I can't really help you.
User avatar
Gunroar:Cannon()
Party member
Posts: 219
Joined: Thu Dec 10, 2020 1:57 am

Re: Packaging an android game on an android device

Post by Gunroar:Cannon() »

Okay, understandable. Anyone else...?
EDIT: from the source code of love it uses androidx and it says that I'm missing it, is that also needed for the build process( right now I keep trail and error-ing using aide) and
or if I get love.so somehow could I use that
or if I can get the android studio export somehow(from an apk) can I use it with aide?

and

is it possible to build it on the command line(using fusing method, not aide) if I get one of those apps that give access to the command line?
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow
User avatar
Gunroar:Cannon()
Party member
Posts: 219
Joined: Thu Dec 10, 2020 1:57 am

Re: Packaging an android game with ads for play store on an android device

Post by Gunroar:Cannon() »

I know things may not have been clear but I hope this clears it up.
I managed to compile an apk in aide and it installs( yay :awesome:) but then
it exits when I click on it(not-yay :( ), I need help.(please, I'm desperate :cry: ).
For anybody who has compiled an apk before(on windows or linux, etc) and owns an android device, please,
you may be of help.
Please just follow these steps(all on android device):
Step 1: please download my package and then unzip it with a file manager(es explorer maybe?)
Step 2:Download aide and install it, then open folder where you unxipped( :P ) it.
Step 3:Click on open project then press run
Step 4:App should compile then pop up so you can install it, if you accidentally dismiss it then go to
android/data/com.aide.ui and you will see MyApp3.apk.
Problem: App closes when i open it, but installs fine. Please help me fix it or change my method if
it's wrong.
Last edited by Gunroar:Cannon() on Sat Feb 20, 2021 12:55 pm, edited 1 time in total.
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow
User avatar
Gunroar:Cannon()
Party member
Posts: 219
Joined: Thu Dec 10, 2020 1:57 am

Re: Packaging an android game with ads for play store on an android device

Post by Gunroar:Cannon() »

All right, the site or some cosmic force is messing with me so I won't post the (8.9mb) project :brows: I've been logged of like 23 times(I wasn't actually counting, but it was a lot). The first message I typed was wiped so I had to-calmly*twitch*-retype it.... SO PLEAÀASEEE don't abandon it, I'll try to post some pictures, Pleeease still help :cry: :cry:.

Edit: After my data finished a magical hotspot from a neighbor without a password got turned on and I'm saved..I feel like crying-*sniff*(It's 00:49, what am I still doing awake -oh yeah ,I'm desperate)
Attachments
Opening as project
Opening as project
Screenshot_2021-02-19-23-29-49.png (199.11 KiB) Viewed 2784 times
Opening folder
Opening folder
Screenshot_2021-02-19-23-28-45.png (116.78 KiB) Viewed 2784 times
MyApp3.zip
Project
(8.88 MiB) Downloaded 28 times
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow
Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests