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!
[SOLVED]Android check standard output?
-
- Prole
- Posts: 18
- Joined: Mon Jan 04, 2016 10:36 am
[SOLVED]Android check standard output?
Last edited by sunsflower on Mon Sep 05, 2016 12:10 am, edited 1 time in total.
Re: Android check standard output?
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.
You can always just rewrite "print" to output directly to the game screen, as an overlay.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Android check standard output?
Here there are two links on how to get print output from LÖVE through Logcat
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
-
- Prole
- Posts: 18
- Joined: Mon Jan 04, 2016 10:36 am
Re: Android check standard output?
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...)?
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...)?
- HugoBDesigner
- Party member
- Posts: 403
- Joined: Mon Feb 24, 2014 6:54 pm
- Location: Above the Pocket Dimension
- Contact:
Re: Android check standard output?
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
-
- Prole
- Posts: 18
- Joined: Mon Jan 04, 2016 10:36 am
Re: Android check standard output?
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:
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.
- HugoBDesigner
- Party member
- Posts: 403
- Joined: Mon Feb 24, 2014 6:54 pm
- Location: Above the Pocket Dimension
- Contact:
Re: Android check standard output?
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
P.S.: I think it is recommended that you add [SOLVED] to your thread's title after you found the solution
P.S.: I think it is recommended that you add [SOLVED] to your thread's title after you found the solution
Who is online
Users browsing this forum: No registered users and 13 guests