As for as I know that android application can be developed in core java only. But is it possible to code android with J2ME? Please give some example codes if possible.
I would suggest using the Android framework to create applications for it. The J2ME runner is a work in progress and will always be a work in progress. Google is not going to ensure that this J2ME project is supported in future releases and it may just stop working with any firmware update.
Keeping this issue aside, you are better off using the vastly different and better application elements that Android provides than being restricted to what is provided using this J2ME runner.
Download Android J2ME MIDP RUNNER:
This is a Android J2ME MIDP RUNNER so
that ANY J2ME or MIDP applications
can run without modification.
So theoretically, you just create your J2ME application and that will ensure that it runs.
The open source license of www.microemu.org seems to indicate that you can even include its code into a commercial application.
Related
I am very good with AppInventor to build Android apps. I have good knowledge of C++ and little knowledge of Java and GUI building in Java. Suggest me how should I shift from App Inventor to Eclipse to build Android apps? Which path should I follow? Is building in Eclipse similar to building in AppInventor like defining different components and then handling their events? Or is it much more than that? Please guide me.
There is also the AppInventor to Java Bridge project at java.appinventor.org, details see below
About:
The AppInventor to Java Bridge project is an addition to
AppInventor that creates a Java written version of the application
from an existing application created through AppInventor. After
creating an application through AppInventor,the user can download a
version of the application that is written in Java, which uses the
JavaBridge* library .
What Our Application Can Do:
Create an Android project in JavaBridge using AppInventor
Applications that use texting, internet and/or sound are supported
Limitations:
- Location aware applications not yet supported
- Nested lists are not yet supported, and will produce incorrect code
UPDATE: the newest version of that tool can be found here: java.appinventor.org
Definitely you should check out the "ALTERNATE Java Bridge". The regular one, built originally by the app inventor team has long since been abandoned. Another programmer picked up the torch and has steadily been using, and improving the bridge for some time. I have been using it myself for 2 years and it is fantastic.
The google project is at: https://code.google.com/p/alternate-java-bridge-library/
and the google discussion group is at : http://groups.google.com/group/alternate-java-bridge-library-discussion
I would just go to the google project site above and ready the tutorial. It is very easy to get started, and he is really good about answering questions for newbies (and i can assist with that as well).
You could take a look at the App Inventor Java Bridge. Check out the link for lots of information, also see here...
The Google App Inventor Java Bridge The App Inventor Java Bridge helps
make a transition from developing Android applications with App
Inventor for Android, to developing with Java and the Android SDK. It
lets you incorporate App Inventor components into apps that you create
in Java with the standard Android SDK tools. If you’ve been using App
Inventor and know some Java, then the Java Bridge is a good way to get
started with the SDK, because building with App Inventor components
hides many of the complexities of the Android framework. As you gain
experience, you can switch over to regular SDK development and create
apps that harness the full power of Android.
Here another link:
http://code.google.com/p/apptomarket/ and you also find videos about the Java Bridge on Youtube, for example this one
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.
Can anyone please clear my doubt regarding the query that does Android Programming has anything to do with the J2ME?
Does Android Development comes under J2ME Platform as J2ME is used basically for the Mobile Applications and Android is also the same one.
Please let me know if anybody is knowing it.
Android has nothing to do with J2ME beyond using the core Java language. In fact, the standard library is more reminiscent of Java SE.
Like Yann mentioned , j2me is not Android and vice versa, however they use the same language with different VMS. Google basically created their own JVM called DAVLIk which got Sun to sue Google because google used their technology without their approval.
There are however some J2ME to Android wrappers. LWUIT currently has such a wrapper.
in both same language will used which is JAVA.
but j2me is made for small devices which is run on kJVM .,
Android is basically made for smart devices.,
using j2me we can developed Third party app .,but Android is the native app which is fully supported by Android OS.
Also you may want to look at MicroEmulator http://microemu.blogspot.ru/2009/08/converting-javame-applications-to.html, it provides J2ME CLDC/MIDP wrappers for Java SE and Android, so basically you can write a midlet and pack it with MicroEmu to run on Android. But it will limit your app to J2ME UI which is quite weak, no comparison with Android. CodenameOne (former LWUIT mentioned in other answer) is a best choice for a cross-platform solution if you need to cover J2ME, Blackberry, Android, iOS and Windows Phone. But if you do not need to support J2ME and Blackberry, there are other solutions too (Xamarin, Marmelade, PhoneGap)
The Google Market offers an application purporting to run J2ME MIDP applications on the Nexus One.
I have tried this application but it only appears to run MIDP applications that are downloaded from particular web sites; it does not seem capable of picking up a MIDP application that is stored on the SD card in the phone.
I have suggested to the developers that they might like to add such functionality, but they have not been particularly responsive to my messages.
So I would like to build my own MIDP runner for Android and would like to see if I can find a pointer as to where to start, or even whether this is possible.
The MIDP application in question was supplied on CD along with a security camera system and permits remote viewing and remote control over the security system.
Clearly it wasn't built with the Android platform in mind. However, if it is possible somehow to run MIDP applications on Android (perhaps by creating some kind of sandbox environment for example) then I'd be quite keen to develop it.
MicroEmulator is a Java implementation of Java ME. You could try porting this to Android. The UI part should be re-written, as MicroEmulator is based on Java SE components that aren't available in Android. Also hardware access won't be possible. Device vendors implement J2ME APIs (camera API for example) and bundle them with the core J2ME. This won't be easy for you to do. You will need to study the JSR specification and implement it in Android.
You can use App Runner to port MIDP apps to Android.
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.