Page 1 of 1

LÖVE Android Development from MacOS

Posted: Mon Mar 02, 2020 9:57 am
by KallioSanteri
Hi!

I have a MacBook Pro which I use for coding. I develop Android apps, but there is one problem. Data communication between MacOS and Android has always been difficult, and still is. I would like to use a physical device for testing the apps, and not only for testing once in a while but to be constantly connected to the code and to test even the smallest changes. I did that on my previous Linux laptop, by simply having my phone plugged into the laptop and editing inside the "lovegame" folder on my phone. Right now I'm using Android File Transfer to transfer the files to my phone every time I want to make a change, but that is so frustrating. AFT doesn't support editing files straight off the phone. Does anyone have a suggestion on how to simplify this process of file transferring every minute or so, or to edit straight off the phone, or to get LÖVE to read files from elsewhere. The last one is probably possible, but the problem is that my laptop doesn't obviously show up as a storage device on my phone. Maybe an external hard drive that could be connected to multiple devices at once (?).

Re: LÖVE Android Development from MacOS

Posted: Wed Mar 04, 2020 4:17 pm
by KallioSanteri
For someone reading this at some point; how I ended up doing it was hosting an FTP server on my phone and installing an FTP add-on to Sublime Text so that I can edit files directly off the "lovegame" folder from the FTP. I used this (https://medium.com/@softxide/installing ... da27f2a98a) article as a baseline, but the difference was that I got package manager installed directly from Sublime Text.

Re: LÖVE Android Development from MacOS

Posted: Thu Mar 05, 2020 9:59 pm
by Ulydev
You could take a look at adb push https://adbshell.com/commands/adb-push
It should work like

Code: Select all

adb push --sync /path/to/src /mobile/path/to/love/game
And then within your game you can use a library to detect changes and restart: https://github.com/anton-kl/lua-hot-reload