pouët.net

Go to bottom

cross-platform cellphone app development

category: code [glöplog]
hi guys,

with the market being shared among iOS, Android and Symbian, we seem to be back in the early nineties when it comes to developing applications that run everywhere. therefore, a question: did any of you ever try and manage to create an app that can be easily cross-compiled to all three targets?

i have very limited knowledge on the field, and afaik Android is all Java, iOS is all Obj-C and Symbian is all C(++), so i've the underbelly feeling that reusing code for apps on multiple targets is nigh-on impossible. nevertheless, at some point someone would have to make something that can overcome this problem no?

btw: of course i could google and find out many of the basic issues. my question is more about whether anyone ever tried cross-platform app development, and with what experiences.
added on the 2010-08-28 14:36:02 by skrebbel skrebbel
ehh, make that "the mobile market", of course. soz.
added on the 2010-08-28 14:36:25 by skrebbel skrebbel
If you're talking about writing a demo the POWERVR SDK abstracts all the OSes you mention and more (Bada, WinMobile, WebOS) so you can write the whole thing in C++.

http://www.imgtec.com/powervr/insider/powervr-sdk.asp
hm, no in fact i'm not talking about a demo, just a pretty normal app (technologically) that allows you to click things and communicates with web services.
added on the 2010-08-28 14:48:42 by skrebbel skrebbel
looks nice though. could at least do the UI with that instead of native widgets.
added on the 2010-08-28 14:49:35 by skrebbel skrebbel
Adobe tried to do just that with the new version of Flash, but got blcoked by Mr. Jobs!
added on the 2010-08-28 15:53:01 by mop mop
Not tried it myself, but I get the impression that PhoneGap is the abstraction layer on everyone's lips at the moment. Uses Javascript / HTML as the common platform, but compiles into a proper native app and provides additional APIs for the phone features that you can't normally access from a browser.

It's worth bearing in mind that Apple have made noises about disallowing apps which are cross-compiled from non-Apple-approved frameworks, claiming some bullshit about them providing a non-optimised experience for iPhone users (in reality, it's more likely that they just want to stop Flash getting in there). Apparently, PhoneGap have official word from Apple that what they're doing is OK, which may be a point in its favour.
added on the 2010-08-28 16:07:55 by gasman gasman
Quote:
compiles into a proper native app

...by which I mean, bundles the result into an executable which you can put on the App Store - not that it statically compiles JS to machine code or anything like that.
added on the 2010-08-28 16:12:16 by gasman gasman
sounds like the way to go, though! thanks for the pointer :-)
added on the 2010-08-28 16:16:31 by skrebbel skrebbel
btw is everyone here getting the feeling that in 10 years from now, any language other than javascript will be obsolete?
added on the 2010-08-28 16:17:22 by skrebbel skrebbel
try programming an OS in javascript ;-)
added on the 2010-08-28 17:51:26 by ara ara
ObjectiveC is a super of C, there is also Objective-C++ which is on top of C++. So for iOS, you can program in C++ and you just need to wrap some stuff that needs to be done in pure obj-c. For android, it's a bit tricker but you can also program in C++ that is called from the java code using the NDK. Bada, symbian are in C++, WebOS in C. So in the end, you can do everything in C++ and you just need to abstract some stuff. Good thing : everything uses OpenGL ES, even windows mobile.
The only problem, in the future : windows phone 7. It doesn't support native, only C# and only D3D.
added on the 2010-08-28 18:11:44 by MsK` MsK`
Quote:
Objective-C++
that sounds like today's most miserable abomination!

your post makes it seem like C might be the better approach, though, if trying to go "native". i'm not sure how badly i'll be needing templates and polymorphism anyway.. (and imho object based coding in C is underrated)
added on the 2010-08-28 18:45:48 by skrebbel skrebbel
ara, why not? in a way, firefox did exactly that, to a pretty far extent. also, eyeOS.

unless of course you're one of those "OS == kernel" guys.
added on the 2010-08-28 18:50:38 by skrebbel skrebbel
nope, since javascript interpreters can't be written in javascript !
added on the 2010-08-28 20:27:26 by zerkman zerkman
Have a look at AirplaySDK: you can develop using C++, which is cross-compiled on your desktop to ARM code that can run on almost any device (iPhone, Android, Symbian). They do this by linking with libraries that have a different implementation for each target system. Very powerful, but seems to be mainly oriented at games (there seems to be limited support for handling 2D text (w/wo markup), but a lot of support for 3D graphics)

Alternatively: check out Bedrock by Metismo. This allows you to program in Java ME, and this is cross-compiled to either another variant of Java ME (e.g. for Android), or to C++ and then to ARM code for other systems. Looks to be more general-purpose.

I imagine that the second option may be harder to debug in some cases, since you have to debug the generated C++ code, not what you wrote orginally in Java.

There are other options, Google for 'multi-platform mobile phone development' or similar.
cool leads! i take it you've been doing this stuff at some point? did you actually actively use any of these?

the airplaysdk license looks remarkably affordable for what they claim to offer. really cool that they have a special license for small companies.
added on the 2010-08-29 01:00:16 by skrebbel skrebbel
Hey Skrebbel,
I've been researching this stuff, and I've compiled a couple of examples from AirplaySDK and run them on my Android 2.2 phone (good stuff!). Still need to do the same on my old Nokia N95.

If you want to contact Metismo, you probably want to call them right away, it seems they're not big on answering e-mails...

I haven't done the latter though: at my workplace we've concluded that at this stage it's better to outsource native mobile development and only do mobile webdevelopment for now (since we're suffering from something of a technology explosion as of late).
Quote:
therefore, a question: did any of you ever try and manage to create an app that can be easily cross-compiled to all three targets?
If you don't actually need to do anything sensible with the phone itself, PhoneGap (and others) can work for you, but in truth there is no easy way to target all of those platforms at once if you're building an app that is even slightly more advanced than a HTML-viewer.
added on the 2010-08-29 21:27:34 by gloom gloom
PhoneGap looks good but if you see what it supports http://wiki.phonegap.com/Roadmap
you might need to write/compile code manually for each phone.
i myself searching for some cross-platform at least for Symbian and iPhone but so far non Symbian itself has different SDKs for different groups of their mobiles so u even need sometime to modify ur code on same platform =\
added on the 2010-08-30 02:09:13 by panic panic
Panic: you will ALWAYS need to do at least some degree of custom work for each phone/platform. That's just the way it is.

If anyone is selling you something that they promise will run on all phones without customization of some kind, they are lying. Period.
added on the 2010-08-30 08:49:39 by gloom gloom
panic: Can't you just ignore Symbian altogether? My impression is that it doesn't have a significant amount of users who run anything but the pre-installed software.
added on the 2010-08-30 08:56:35 by doomdoom doomdoom
doom: That impression is just that - an impression - and it has little to do with reality, and more to do with the amount of press that Apple and Android is able to get. :)
added on the 2010-08-30 09:14:02 by gloom gloom
What gloom and Doom said - I don't see the poiint in dveloping anything for the symbian unless it's an app for a "major" company that already has or will invest in a set of Symbian phones.
My experience is exactly the one Gloom mentioned, let's repeat:
Quote:
If anyone is selling you something that they promise will run on all phones without customization of some kind, they are lying. Period.
added on the 2010-08-30 09:16:59 by Puryx Puryx
Well yeah you might Symbian has fewer users than before but the whole idea for the application is that i am working on it is to have it at least semi-crossplatform means that works on major brand mobiles (iPhone,HTC,Androids,BB) plus some old pal of Symbian machines either Nokia or Sony Ericsson i know it'll be long journey to write for all these brands but yeah what can i do -_-;
added on the 2010-08-30 11:04:22 by panic panic

login

Go to top