Dummy questions about android deployment, banners, etc

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.
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Dummy questions about android deployment, banners, etc

Post by tahoma »

Hi there,

I have a bunch of noob questions regarding game distribution for android and would really appreciate some guidance:
(Sorry for a lengthy post)

1) How do I distribute a love2d game (written in lua, if matters) for android devices? Specifically,
a) Is this information up to date?
b) Even more specifically, this one?
c) As of now, I'm using .love files to test my games on a mobile device. Is there any reason to convert a game into an apk before late-stage testing? (Eg, one of the features described below wouldn't work.)

2) I'm not sure if I want to use these, but I'm also trying to figure out what are the libraries / methods to have banner ads and/or in-game purchases:
a) This library looks great, but I'm not 100% sure I understand the mechanics:
i) How does this library interact with love-android-sdl2? Was it sort of built on top of love-android-sdl2 so that one would need only one? (This question clearly demonstrates that I obviously do not understand the ins and outs of love-android-sdl2.)
ii) I don't really understand how I can incorporate this library into my lua code if it's possible at all. Is the idea that I need to confige and compile the libray and then can require it? Or does this library overwrite some parts of love2d engine itself? Or is it the case that i can use the library's commands, but the only way to test them is by compiling an apk file every single time (or maybe by running .love on a mobile device)?
a) My understanding of in-game purchases is that one would need to use a library such as this one to send request to a transaction service API (eg, the google one).
i) Am i missing anything?
ii) Is it testable by running .love file on an android or apk installation is necessary? (obviously, i could test it before asking:))

Again, sorry for a lengthy post, but I have a strong feeling that I lack an understanding of the basics. Thanks!
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Dummy questions about android deployment, banners, etc

Post by yetneverdone »

Hi, both guide (compiling and apktool) works fine. It depends upon how much you want when building.

1. Compiling everytime using the love-android-sdl2 takes longer time but you have many tools at your disposal.

2. Apktool is easier and smaller, you can make a script (i have one for linux if you need so) to automatically do all the steps for you.

The love-android-sdl2 is the source code of löve that is ported/worked on to be compatible for android. You dont use that as a library. You just simply make your own löve game as how you would do for desktop, but building it is different with android.

You may run a .love file in android, just install the barebone löve apk in your phone, then open a love file with that app. Though you won't get stuff like banners/admob and such with that method.
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Dummy questions about android deployment, banners, etc

Post by tahoma »

yetneverdone wrote: Sun Jun 30, 2019 12:58 pm Hi, both guide (compiling and apktool) works fine. It depends upon how much you want when building.

1. Compiling everytime using the love-android-sdl2 takes longer time but you have many tools at your disposal.

2. Apktool is easier and smaller, you can make a script (i have one for linux if you need so) to automatically do all the steps for you.

The love-android-sdl2 is the source code of löve that is ported/worked on to be compatible for android. You dont use that as a library. You just simply make your own löve game as how you would do for desktop, but building it is different with android.

You may run a .love file in android, just install the barebone löve apk in your phone, then open a love file with that app. Though you won't get stuff like banners/admob and such with that method.
Ok, let me try to summarize this to make sure that I understand this: I need to compile my code every time if I want to test android-specific features such as banners etc. Is this correct?
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Dummy questions about android deployment, banners, etc

Post by yetneverdone »

You need to make a .love file everytime, then copy that to the assets folder in the love-android-sdl2 folder then compile to make an apk.

Making a .love file takes almost to no second at all. If you use a script to automate your workflow, it's easier like a single button press

Using the apktool method is easier for me.
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Dummy questions about android deployment, banners, etc

Post by tahoma »

One follow up on this.
For some reason I cannot install my game, using a built apk. Does anyone know what could be a potential reason?

I seem to follow all the instructions:
(1) I put a zip archive renamed into game.love into /app/src/main/assets
(2) I sync and build the project in android studio (I use the 11.x branch of the repo)
(3) I use the apk in the app/build/outputs/apk/debug

I don't get any particular error besides my android telling me that the app is not installed.
Thanks!
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Dummy questions about android deployment, banners, etc

Post by tahoma »

yetneverdone wrote: Wed Jul 03, 2019 2:46 pm You need to sign the apk
Ok, I assume that you don't elaborate because it's trivial.
I added signingConfigs to the app build.gradle, but I still get the error and cannot install the app. What did I do wrong?
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Dummy questions about android deployment, banners, etc

Post by yetneverdone »

Possible reasons for apk not getting installed is either not zipaligned or not apksigned, or android api incompatibility. Maybe zipaligned?

You can try installing the apk using adb, with that you can have error message about the problem afaik
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Dummy questions about android deployment, banners, etc

Post by tahoma »

Ok, obviously I need to learn much, because when I thought I signed it, I did not in fact do that.
Now, I can install the app, but I get an error that it couldn't find "libc++_shared.so" at application start.
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Dummy questions about android deployment, banners, etc

Post by tahoma »

Here is what I struggle with at the moment:
66528364_363768791004116_4287234035584860160_n.jpg
66528364_363768791004116_4287234035584860160_n.jpg (123.12 KiB) Viewed 8709 times
As usual, any advice is appreciated:)
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 51 guests