SL4A vs Ruboto on Android Application Development - android

I am thinking about creating apps on Android using JRuby (or a suitable variant of Ruby for Android).
According to my research there are two current projects that support Ruby development on Android:
Ruboto
SL4A
From the FAQ of the Ruboto wiki on github it seems like Ruboto is ready for application development, but does not yet support JIT compilation, and the application has to be packaged with libraries which give it a big footprint (for mobile device installation).
I don't have enough knowledge about SL4A but it seems like SL4A also tries to run JRuby scripts on the JVM. But the main thing is that SL4A is still in alpha, so I don't know if it can be used for app development.
Can someone with a better knowledge of these platforms suggest which one should be used? Also, in the near future, which one has the better probability of becoming more mature in terms of JIT (performance), lower footprint, and better API access to Android?

Mirah, by the developer of JRuby, already with some production apps, is appropriate for Android. One can use the Android API directly while mentally converting the Java syntax as you do so to 'almost-Ruby', whose syntax it 'stole'. It adds no library files (instead, compiler syntax plugins are used) and it has literally exactly the same runtime speed as Java. So it features performance, zero footprint and ideal API access to Android.

Related

Is developing an application for Android using Lua only possible?

So I read this article on Mobile Orchard and, as I'm planning on having my first steps in Android development, it got me thinking: is it possible to develop for Android in Lua only? I Googled the topic but found no definitive answer. I know Java is the "base style" for Android but for the coding newbie which I am (elementary Python, basic C++), Lua seems somehow clearer and more friendly. Then here goes my question: can one develop an Android app using Lua only? If so, could you please show me some directions to move from here?
I've been developing a mobile application in Lua to control robots remotely from iOS and Android phones. The app is in pure Lua and runs on top of Mosync platform using MobileLua. There is still some plumbing required, but it's not too complex.
I also have a debugger and a Lua IDE (ZeroBraneStudio) that support debugging of Lua scripts running remotely (including MobileLua scripts running on Android or iOS devices). I provide a demo app you can use as a client to run simple scripts and check remote debugging in action.
[Update] If you are interested in more game oriented options, there are several available: (1) already mentioned Corona SDK, (2) Moai, and (3) Gideros Mobile. There is also Marmalade Quick and Cocos2d-x Lua bindings (for example, quick-cocos2d-x). All these toolkits/frameworks allow to develop in Lua.
Here is a detailed comparison of Moai vs. Corona.
I know this is an older question, but just to correct some misinformation (in the comments) for people who come later, Corona SDK (as of spring 2013) has a Starter Edition which is free -- no splash screen or anything. The main difference between it and the "Pro" version is you can't do in-app purchases in the Starter Edition. But you can use it to create apps for sale, etc. No expiration date on it or anything.
And in answer to the original question, learning Java may allow you to write Android apps, but if you then also want to target iOS you don't have any great options. By choosing something that's cross-platform from the beginning you can target Android or iOS or both. Lua (in any of the flavors already mentioned) is a great base language to learn for mobile development.
The question is what kind of app do you want to build and what skills do you have. If you are already familiar with JavaScript there is Phonegap/Cordova. If you are building games there are a number of frameworks for 2D and 3D which use Lua. Some are free, others have licensing fees but are worth it if it provides a solution to your problem. All have pros and cons. For example I'm not sure if I would want to build an RSS reader in a game framework. Java is just another language, I would recommend just learning Java and the Android framework to start and knowing what is there before adding another application specific framework layer on top.
Corona SDK allows you to write iOS and Android apps in Lua. Its very easy to learn, but its not free.
Edit:
I saw you posted that you found Corona just after I sent my post...
You can try http://scormpool.com/luastudio
Develop and run code on your device including iOS, Android, Mac, Win.
Exporter can help you to make standalone app on listed above platforms.
This may not be useful to the OP, however for other people interested in using lua to write their apps, I'd share my thoughts. So to answer the question:
Yes, you can use only lua to write apps for android using LuaJava from the kepler project (though I don't believe its being maintained anymore). You can create and manipulate Java objects seemlessly, and interact with the Android APIs through lua. You can even create UI elements dynamically using just lua. However, a small amount of java bootstrap code is needed to start the lua VM from your app. The AndroLua project is a great place to start for Android. The creator has done a lot of work making lua work with Android and packaging it all into an app. From experience I can say it works great! However, I would in no way recommend this to a beginner, as it requires a lot of knowledge about java and lua to make things work, meaning more work not less.
For AndroLua, just clone the repo and use that as a base for your own app. Last time I used it, I just imported it into android-studio, and after fixing a few problems with my own setup, had it compiling and running on my device.
If only pure Lua then the answer is no.. unless you want to use a lot of libraries
If you want to make little Android app/games then use a game engine, learning is a step by step process, don't dive straight into the hard part.

Building android app

hey guys, i am researching android app development, and i cant find much on building an app in C or C++, so my question is, is it possible to build an android app using only C or C++ ?
Yes, in the most recent versions of the NDK they've announced such a capability. Before that, you could have an app that's a thin layer of Java on top of a C/C++ NDK core.
The majority of the run-time library is still Java-based, and accessing it from C++ is not exactly straightforward. JNI exposes the Java world to C/C++ callers, but it does not look pretty.
You might consider one of the other cross-platform services (e.g. MoSync), but realize that they are also limited in the sense that they give you access to more generic language features. Advanced or new features, such as NFC are not yet supported. Further, if you are planning on deploying the app commercially, you may have to pay them a royalty. You can get a better amount of information at their site.
Sure, using the Android Native Developers Kit.

Cross platform non-browser development for tablet PCs?

I have to develop an app for the Ipad. It has to be non-browser based. That's a requirement and I can't change it.
I think it likely that the app would be useful on other tablet PC types and have a good chance of a second app which requires IPad and Android at a minimum; Windows and Linux would also be useful.
If it makes any differences these are "desktop" apps for tablet PCs and it is not envisaged that there will be any handphone development.
Is there a “Grand Unifying Theory” of cross-platform desktop app development? Is there a good IDE, preferably FOSS? I'd rather code C++ or Java and am less keen on Ruby or Python (through lack of experience) but would accept if there is no alternative.
I need a GUI builder, something like Borland Delphi or MSVC or the Eclipse Android plugin and I need a way of executing different code on different platforms (#ifdef Android … etc)
Any ideas, or should I just go ahead and code the current project for Ipad only and stick to browser based HTML5 + CSS3 with Jquery/Ajax for cross platform apps (the problem being that some will need to execute native system calls, like en/de-crypting a file and at least one app has to work in “local mode” if there is so internet access, so I guess I would have to bundle a web server (Apache) if I go browser based (in order to serve the web pages), which would not be necessary with a “desktop app”.
Any recommended IDEs, Web sites? Books? Thanks
The "grand unifying theory" is that core business logic should reside in the cloud; that allows your iOS and Android implementations to be just a thin GUI on top of this shared logic. Unfortunately, there isn't really a way to reuse the GUI, and even if you did, it would go against the intuition of users on one or both platforms, since you wouldn't be using the paradigms of those specific platforms.
Google App Engine provides a way for implementing your core business logic in Java on top of Google's cloud computing infrastructure at reasonable costs (development is free, cost is proportionate to usage, and one can put caps on how much one is willing to pay). There is an Eclipse plugin for developing App Engine applications. When developing for Android, you will similarly want to use Eclipse (there is a plugin specifically for Android development), although the Android SDK can be used just from the commandline (which is good for setting up a continuous build and test system).
For iOS, you will want to use the standard Xcode and the iOS SDK. Xcode is an IDE, but it is possible to build Xcode projects directly from the commandline using the xcodebuild command (also good for continuous building). The standard language for iOS applications is Objective-C.
You should take a look at jQuery Mobile. I used it to cross develop between Android and Playbook. I know that it also does iOS.
Maybe for you the downside is that you have to program in JavaScript.

Is it possible to embed Guile in a C++ app on iOS or Android?

Guile looks somewhat straightforward to embed into a C/C++ project, but how does it fare on iOS or Android? Does it require 3rd party libraries that are unavailable for those platforms?
How is it as an embeddable scripting language as opposed to JavaScript or Lua?
On iOS, C++ (apparently) works for back-end code, however, you'll need Objective-C for the GUI/event handling. (Corrected).
In addition, Android code is usually Java. While you can write native-code, it is often slower because of the communication overhead between native code and Dalvik code on Android.
Guile builds with the GCC, and Apple's Xcode contains a variation of the GCC, so you might get it to work. However, I would be careful about a few things:
1) Apple's GCC fork may not contain all of the features necessary to build modern versions of Guile.
2) While Guile itself is licensed under the LGPL (GNU Lesser General Public License), and is therefore allowed to be used in iOS apps, many Guile libraries could be under the GPL, rendering them unusable (for legal, rather than technical, reasons).
I haven't been able to test this (don't have access to a Mac), however, Guile should at least build in Xcode.
As for Guile's performance as an embedded scripting language, personal preference takes precedence. Guile is a full-featured, modern Scheme, however, you must consider your target market. If they are likely to reject Scheme, JavaScript (especially) may be a better choice.

Complete Way to Compile Complex Native Applications to Android ARM

This is my first S/O question, please be gentle!
I'd like to know more about porting C applications to native ARM for use on Android devices.
I can make simple programs using the prebuild toolchain which comes with the source, but how can I use this toolchain with applications which are more than one file and require configure and make?
This article explains it quite well:
http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/
Basically, you create a shared library like you normally do, wrap it with JNI and call it with native methods from Java.
At Google I/O they talked about introducing an "NDK" -- native development kit -- that should simplify the process of creating applications that use native (C) code.
It's worth noting a couple of things before you go too far down this route:
The NDK will provide limited functionality. It will be primarily intended to offer a way to run extremely time-sensitive code natively, but won't have access to the full system, nor will it provide an alternative application development model (you'll still need to write most of your app for Dalvik).
You can write native apps without the NDK, but you won't be able to distribute them to end-users using the conventional APK application package supported by the app store. It's really only a viable option if your app is being distributed as part of the carrier / OEM build - and even then isn't recommended.

Categories

Resources