Java ME compatibility layer for Android
Is there any Java ME compatibility layer for Android, which makes porting Java ME (aka. J2ME) applications easier?
I mean a third party class library which redirects calls to internal Android API开发者_JS百科.
This is generally a bad idea.
Design, application management, lifecycle and resource access are entirely different. It makes little technical sense to try to run the same application on J2ME and Android.
What the use of the java language on both platform allows you to do is reuse all your platform-independant logic. If your MIDlet is already correctly designed, most of the code that represents business or domain logic should be reusable on Android.
Given the granularity of Intents and Activities in a proper Android application and the constraints the system imposes on their behavior, not making the effort to correctly adapt to the new application architecture is just asking for troubles.
精彩评论