Page 1 of 1

[SOLVED]Android check standard output?

Posted: Sat Sep 03, 2016 2:14 pm
by sunsflower
When I run love on android, how can I see the content I "print" to standard output, since when I run the app no console is shown? Do I need root first?
thanks!

Re: Android check standard output?

Posted: Sat Sep 03, 2016 3:27 pm
by raidho36
I don't think you can print to a "phone console" since it isn't there; normally debug output goes to PC IDE console via debug mode USB connection but you'd had to launch the app via debug mode USB connection as well.

You can always just rewrite "print" to output directly to the game screen, as an overlay.

Re: Android check standard output?

Posted: Sat Sep 03, 2016 5:07 pm
by Positive07
Here there are two links on how to get print output from LÖVE through Logcat

Re: Android check standard output?

Posted: Sun Sep 04, 2016 1:33 am
by sunsflower
thanks a lot! no phone console indeed.
by and by i've installed a terminal simulator. is it possible to run love with a folder which contains main.lua on android(actually Im trying to develop on my phone...) just like on a pc console(in the simulator...)?

Re: Android check standard output?

Posted: Sun Sep 04, 2016 1:45 am
by HugoBDesigner
It is possible to code directly from an Android phone. I used to code from my Android tablet all the time. All you need is to install the LÖVE for Android app and a code editor. Then you'll write your game in your "lovegame" folder (in the root folder, I think. Don't take my word for it). As far as I know, though, you have to open the LÖVE app every time you want to test, but it still works pretty well ;)

Re: Android check standard output?

Posted: Sun Sep 04, 2016 2:27 am
by sunsflower
so I need to root my phone first(havn't done it yet @=_=@ )? currently I always have to compress a .zip and rename it to a .love file and then use a file manangement app to open it....

p.s.: ah, never mind. I've found a description in goolge playstore:
You can run games in multiple ways:

Upload your .love file to a web server and open the link with a browser on your Android device
- or -
Put the .love file on your device and open it with a file explorer (e.g. X-plore, open file as */*, select LÖVE for Android).
- or -
Extract it to /sdcard/lovegame such that main.lua is found at /sdcard/lovegame/main.lua and then run the app
- or -
Extract your game anywhere on your device and open its main.lua using a file browser (e.g. X-plore, open main.lua as */*, select LÖVE for Android).

With extracted sources you can edit the source files with any text editor of your choice to tweak your game or add new functionality.

Re: Android check standard output?

Posted: Sun Sep 04, 2016 3:16 pm
by HugoBDesigner
Yeah, I meant in the root folder as in /sdcard/, not exactly "rooting your phone" (bad wording from my part, sorry). But at least you found a more detailed explanation than I could give, so it's nice that you found it :awesome:

P.S.: I think it is recommended that you add [SOLVED] to your thread's title after you found the solution :)