Page 4 of 6

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sat Aug 13, 2016 8:09 am
by knuxyl
I was getting java exceptions like crazy and qubodup's solution worked for me.
OS = linux
ARCH = x64
I downloaded jdk-8u102-OSARCHH.tar.gz and StartGamedev-160804-OS.zip
Extracted jdk-8u102-linux-ARCH.tar.gz and StartGamedev-160804-OS.zip
Deleted everything in StartGamedev-160804-OS/tools/jdk-OSARCH
Copied everything in jdk-8u102-OSARCHH/ to StartGamedev-160804-OS/tools/jdk-OSARCH
Running ./make-apk now works without any errors. Thank you

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Wed Aug 17, 2016 10:47 pm
by scissors61
Hey @qubodup I've got a new doubt. As I said before, your tool works great, but even it's not the fault of your LoveToAndroid but is of love-android-sdl2, the games are stuck in landscape mode. Is there any possibility of setting the game to portrait mode from your tool?

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Thu Aug 18, 2016 5:26 am
by qubodup
scissors61 wrote:Is there any possibility of setting the game to portrait mode from your tool?
Sure! It's an Android thing.

In tools/love-android-sdl2/original/AndroidManifest.xml replace "Landscape" with "Portrait".

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Thu Aug 18, 2016 4:46 pm
by scissors61
I've just tried, but after using ./make-apk.sh the resulting apk is in landscape and AndroidManifest goes back too to landscape.

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Thu Aug 18, 2016 4:49 pm
by qubodup
I'm sorry, I forgot that the scripts overwrite that file. The file you have to change is
tools/love-android-sdl2/original/AndroidManifest.xml
(I updated the above post)

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Thu Aug 18, 2016 7:43 pm
by scissors61
That's it. It's perfect now. Thanks!

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sun Sep 04, 2016 5:06 pm
by laperen
is there any way to allow the game to run in the background of the device? or have i missed some functionality to allow this?

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sun Sep 04, 2016 5:26 pm
by raidho36
It's strongly discouraged to make your game run in background, for any reason, ever. You basically should never do this. It only drains the battery while the user doesn't even interact with it. Games made in GameMaker offer no such option altogether, the manual explicitly states that the game will just hibernate and may be shut down immediately afterwards too. I think Unity does something similar, so does LÖVE Android app it appears. And even then, many phones nowdays have power management options that flat out prevent apps from running in background sans select few exceptions. Surely enough if your game requires user interaction, having it run in background and screw everything up while the user doesn't have a chance to do anything about it is just cruel and shouldn't be done like this, just pause the game instead. If it doesn't requires interaction and just requires waiting, then there's no reason why it should run at all, you can simply save the timestamp immediately before hibernation and then grab a new timestamp immediately after wake up, this way you'll know how much time elapsed and you can do all the calculations offline post-factum.

So that's the long answer. Short answer: no, and please don't.

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sun Sep 04, 2016 5:32 pm
by qubodup
laperen wrote:is there any way to allow the game to run in the background of the device? or have i missed some functionality to allow this?
Unfortunately I can't help with that. This might require writing Java or perhaps this thread is enough:
You should use love.focus for that. The current version currently has some issues about android and background though, they'll be fixed in 0.10.1.
raidho36 wrote:just pause the game instead
That's probably what they meant. If I remember correctly, if you go to the home screen now and then return to the game, it will restart. [EDIT: thanks for clarifying in post below]

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sun Sep 04, 2016 5:33 pm
by raidho36
No it doesn't restart, it resumes execution from cache as if it never halted. If you however return to home screen and launch the app from the icon, it will restart.