• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

cross platform mobile app development

think2

Senior member
Can Java (J2ME?) be used to build mobile apps that run on nearly all mobile phones and tablets including Windows phone?

If I google for "how to build cross platform mobile apps" I don't see much mention of Java. Instead, discussion seems to be most often comparing phone-gap, itanium and xamarin. Phone gap puts me off because it's browser based and has performance issues, itanium is ios and Android only and xamarin costs money and doesn't support outsiders of the main three like symbian or blackberry.

Is Java viable for mobile app development. I had a look at this
http://wiki.netbeans.org/CrossPlatformMobileSoftware and the tutorial linked to is a mere 8 years old. And this book
Building Mobile Applications with Java mentions only Android and iOS.
And this oracle web page looks to be at least 4 years old
JAVA FOR MOBILE DEVICES

Regarding xamarin, does anyone know the size of the ".net runtime" needed to support C# apps - do most phones already have this installed?
 
Android supports java natively and there are Java tools for iOS like RoboVM. Neither of these are truly cross-platform as you need to write specific code for the targeted platform. Cross platform usuallly means you can run the same code on different platforms with minimal changes.

The .net runtime is not installed on any mobile platform except Windows Phone; however that is Microsofts .net and not Xamarins. The Xamarin deployment packages will install whats needed for each target platfom.
 
Last edited:
while this won't help out your windows phone development, i've recently been using this tool called apportable that will port a native iOS app to android. i literally added 1 line of code to my code (just to set the screen size properly) and it built on android and worked perfectly. but you can use the same exact code and just use #ifdef's to run code based on the platform you are building on.

the only things that did NOT work perfectly were things like iAds, facebook sharing, and leaderboards. but that makes sense since those are platform independent big time. but the actual basic functionality works just fine and the game works flawlessly on both.

i'm in the midst of getting the ads to work though on the android side. they have a way to call native java code from the objective c side using their bridgekit. i'm nearly finished doing the ad stuff and once i have that done i'm going to publish it to the play store, then work on the facebook and leaderboard stuff shortly after. i hope it's not as much of a headache as this was because there was an admob issue that i finally solved yesterday via another method.

they offer a free version of apportable and they also have some pay versions that include some native libraries to use so you don't have to write your own code with their bridgekit. but since i'm just doing this as my own personal projects, i am using the free version.
 
What's your app? The appropriateness of this solution depends on what you're doing. You can write your applicaiton as a mobile webapp and write a light-weight wrapper application for each platform.

Advantages:
- can still take advantage of platform specific features
- develop on a single webapp used by all platforms simultaneously
- users get updated features without downloading updates

This obviously won't work for something like a game, but it would work for something like a mail cient.
 
I don't want to say what the app is but can a web app access a local database? What is the best GUI toolkit to use?
 
I don't want to say what the app is but can a web app access a local database? What is the best GUI toolkit to use?

Web apps can access a local SQL database implemented in the browser (http://blog.darkcrimson.com/2010/05/local-databases/). With websockets I suppose it might be possible to bridge to an actual local database, but I don't know what the constraints on websockets are because I haven't used them yet.
 
Back
Top