luasocket icon indicating copy to clipboard operation
luasocket copied to clipboard

will this luasocket work on android?

Open jareesh opened this issue 7 years ago • 2 comments

I am using luasocket in my lua script in crank storyboard UI, which i am developing. I am able to communicate between two apps in my windows environment using the luasocket. I wanted to communicate with outside world from my android app. Will your socket if used in my lua script work on android device? The app fails to even launch in Android device if i use luasocket.

jareesh avatar Nov 10 '17 11:11 jareesh

I know luasocket works on mobile since love2d uses that and that works... They may be using a slightly modified version, but Idk...Since android is using ARM processors there is most likely a compilation flag you need or some form of tweaking. I never compiled for ARM/mobile before, but take a look at the love2d source and build files, they may provide a hint.

rayaman avatar Nov 20 '17 14:11 rayaman

A quick peek at the love2d luasocket code reveals that they're embedding LuaSocket sources into their own CMake build rather than using our own LuaRocks rockspec or makefile.

The good news: This proves that LuaSocket can be built and run on Android, and serves as an example.

The bad news: We don't have their way (or any other way) baked in, whether via the LuaSocket makefile or the LuaRocks rockspec (nor do we have an APK of any kind, obviously).

It would be great to have a known good path to Android building in-tree here. If anyone can help, a PR would be most welcome.

We're reviewing open items in preparation for a release. If action is needed here, please add a comment. Otherwise, this issue will be closed on or after 24-Feb-2019.

Thanks!

ewestbrook avatar Feb 18 '19 12:02 ewestbrook

Given the way Android sandboxes apps in their own little world, I don't think "on Android" makes much sense since this isn't something you'd just install on an Android system. On the other hand baking it into your project as vendored code and mixed in with your project's build system makes perfect sense, but the specifics of how to do that are more up to the specific layout of your project and build system than it is up to us.

If anybody knows anything actionable here feel free to comment for review.

alerque avatar Nov 10 '23 19:11 alerque

it actually does work. Given the app has INTERNET permission.

ildar avatar Nov 10 '23 19:11 ildar