Android Projects

Android Development Books

Monday

iOS / Android cross platform development or Android-iPhone single codebase cross development

Quation is:

I've been playing around with developing Android apps in Java for a while and am starting to get a handle on it. However if I want to on start on an iOS version I need to code everything from scratch - which is, well, undesirable.
I was wondering on what cross platform solutions there are available and how well they work in practice. I've been thinking about web applications - perhaps using jQuery Mobile or Titanium, or Adobe Flash/Flex/Air. I also don't yet have a Mac, which I'll probably have to invest in.
So my Questions :
  1. What cross-platform development environments exist for iOS / Android (and/or other devices)?
  2. What has your experience been with these tools? (this is what I'm really keen to know)
 Or

Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C. What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS? Based on current answers, the best cross platform development tool for iOS and Android seems to be Titanium appcelerator. I suspect that this topic will evolve overtime, so feel free to contribute with new information and comments.

 Solutions is:-

Disclaimer: I work for a company, Particle Code, that makes a cross-platform framework. There are a ton of companies in this space. New ones seem to spring up every week. Good news for you: you have a lot of choices.
These frameworks take different approaches, and many of them are fundamentally designed to solve different problems. Some are focused on games, some are focused on apps. I would ask the following questions:
What do you want to write? Enterprise application, personal productivity application, puzzle game, first-person shooter?
What kind of development environment do you prefer? IDE or plain ol' text editor?
Do you have strong feelings about programming languages? Of the frameworks I'm familiar with, you can choose from ActionScript, C++, C#, Java, Lua, and Ruby.
My company is more in the game space, so I haven't played as much with the JavaScript+CSS frameworks like Titanium, PhoneGap, and Sencha. But I can tell you a bit about some of the games-oriented frameworks. Games and rich internet applications are an area where cross-platform frameworks can shine, because these applications tend to place more importance of being visually unique and less on blending in with native UIs. Here are a few frameworks to look for:
  • Unity www.unity3d.com is a 3D games engine. It's really unlike any other development environment I've worked in. You build scenes with 3D models, and define behavior by attaching scripts to objects. You can script in JavaScript, C#, or Boo. If you want to write a 3D physics-based game that will run on iOS, Android, Windows, OS X, or consoles, this is probably the tool for you. You can also write 2D games using 3D assets--a fine example of this is indie game Max and the Magic Marker, a 2D physics-based side-scroller written in Unity. If you don't know it, I recommend checking it out (especially if there are any kids in your household). Max is available for PC, Wii, iOS and Windows Phone 7 (although the latter version is a port, since Unity doesn't support WinPhone). Unity comes with some sample games complete with 3D assets and textures, which really helps getting up to speed with what can be a pretty complicated environment.
  • Corona www.anscamobile.com/corona is a 2D games engine that uses the Lua scripting language and supports iOS and Android. The selling point of Corona is the ability to write physics-based games very quickly in few lines of code, and the large number of Corona-based games in the iOS app store is a testament to its success. The environment is very lean, which will appeal to some people. It comes with a simulator and debugger. You add your text editor of choice, and you have a development environment. The base SDK doesn't include any UI components, like buttons or list boxes, but a CoronaUI add-on is available to subscribers.
  • The Particle SDK www.particlecode.com is a slightly more general cross-platform solution with a background in games. You can write in either Java or ActionScript, using a MVC application model. It includes an Eclipse-based IDE with a WYSIWYG UI editor. We currently support building for Android, iOS, webOS, and Windows Phone 7 devices. You can also output Flash or HTML5 for the web. The framework was originally developed for online multiplayer social games, such as poker and backgammon, and it suits 2D games and apps with complex logic. The framework supports 2D graphics and includes a 2D physics engine.
NB:
Today we announced that Particle Code has been acquired by Appcelerator, makers of the Titanium cross-platform framework.
...
As of January 1, 2012, [Particle Code] will no longer officially support the [Particle SDK] platform.
Source
  • The Airplay SDK www.madewithmarmalade.com is a C++ framework that lets you develop in either Visual Studio or Xcode. It supports both 2D and 3D graphics. Airplay targets iOS, Android, Bada, Symbian, webOS, and Windows Mobile 6. They also have an add-on to build AirPlay apps for PSP. My C++ being very rusty, I haven't played with it much, but it looks cool.
In terms of learning curve, I'd say that Unity had the steepest learning curve (for me), Corona was the simplest, and Particle and Airplay are somewhere in between.
Another interesting point is how the frameworks handle different form factors. Corona supports dynamic scaling, which will be familiar to Flash developers. This is very easy to use but means that you end up wasting screen space when going from a 4:3 screen like the iPhone to a 16:9 like the new qHD Android devices. The Particle SDK's UI editor lets you design flexible layouts that scale, but also lets you adjust the layouts for individual screen sizes. This takes a little more time but lets you make the app look custom made for each screen.
Of course, what works for you depends on your individual taste and work style as well as your goals -- so I recommend downloading a couple of these tools and giving them a shot. All of these tools are free to try.
Also, if I could just put in a public service announcement -- most of these tools are in really active development. If you find a framework you like, by all means send feedback and let them know what you like, what you don't like, and features you'd like to see. You have a real opportunity to influence what goes into the next versions of these tools.
Hope this helps.
Solution from the stackoverflow which is accepted answers.

and

You could use Titanium appcelerator. Titanium allows you to write apps in an abstract way with JavaScript and then compile it to a mix of JavaScript and native code. This gives you a native look on iPhone and Android with only a single JavaScript code base.
Titanium states that their approach complies with Apple's terms of service, and there are some Titanium apps in the Android market and itunes store.
it is also accepted answers from stackoverflow
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

1 comments

  1. Thanks for sharing a wonderful information regarding android cross platform development.

    Android Developers

    ReplyDelete

Thanks for your comment

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

Related Posts Plugin for WordPress, Blogger...
© Google Android Lovers
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0