0

I am trying to create a web server on a Windows CE device, and Lua or Scala seem like it would work but I can't find any information on it, has anyone done this successfully?

Also it should run on a android device as well, and thats one of the reason I am looking into Lua or Scala, since its supposed to be multi-platform.

The idea is to create a "router config page" like solution, so not an app, it has to be running all the time, and be accessible by the devices IP address (ie. http://123.123.1.1/config)

Oakcool
  • 1,470
  • 1
  • 15
  • 33

1 Answers1

1

I do know that there is support available for using Scala on Android. However, the support exists in the form of an external library that you can import in your application, so there will still be a measurable amount of java that is required in order to create your Android application. Information regarding the usage of Scala within Android may be found here:

http://scala-ide.org/docs/tutorials/androiddevelopment/

There is also an existing post that disusses the feasability of using Lua on Android: Is developing an application for Android using Lua only possible?

If you are looking to design an application that works on multiple platforms without having to develop unique code for each platform then I would suggest looking at something like PhoneGap, which allows you to develop an application without relying on platform-specific APIs. http://phonegap.com/

Community
  • 1
  • 1
Willis
  • 5,308
  • 3
  • 32
  • 61
  • Yep, there is also Xamarin (http://xamarin.com/), but I need a web server in the app. So is not quite an app, and more a service (host) for HTML and jscript and server side code. – Oakcool Dec 26 '14 at 19:53
  • Lua might be an option; I edited the post to include a link to an existing post which discusses using Lua on Android. – Willis Dec 26 '14 at 19:54
  • Both options are for App development, and not a web server host, but its good to know there are option on that sense. – Oakcool Dec 26 '14 at 19:58
  • Will the web server host not still be in the form of an application? Or how else will you run it on the Android/iOS device? – Willis Dec 26 '14 at 20:00
  • more like a service (always on) and its Windwos CE/Android – Oakcool Dec 26 '14 at 20:02
  • Gotcha. Even a service within Android must still be started from within an application though. So you could always write the service using mainly Lua/Scala and then just launch said service from the Android application. – Willis Dec 26 '14 at 20:11
  • Interesting, thanks. Now I need to figure out how it would work on the Windows CE side. I am really trying to avoid writing 2 separate solution to do the same exact thing, and never thought it would be that complicated. – Oakcool Dec 26 '14 at 20:13
  • You should be able to avoid the majority of the work associated with developing a multi-platform app by writing the main web server host functionality in Lua/Scala or whichever language you choose to make it portable across platforms. Then all you need to do is add the supporting code necessary for each platform. For Android, this could be a simple application with an `Activity` that creates and launches a `Service` that implements your web server functionality. Unless you use a service like Phonegap or Xamarin, some additional work will be required to make your application cross-platform. – Willis Dec 26 '14 at 20:20