What is the best way to develop a mobile application that run on multiple devices mainly (android and iPhone)? - iphone

What is the best way to develop a mobile application that run on multiple devices mainly (android and iPhone)?
1) Use android frame work and iOS framework.
2) Or use a cross platform development library something like (AirPlay SDK for example).
3) Or there is other way else you prefer.
Please feel free to give me your suggestions.
Edit: I forgot to say, it'll be a game which require a lot of 2-D graphics.

Appcelerator Titanium is a solution. You write your app in Javascript/CSS and it compiles to Android and iOS via shims.
http://www.appcelerator.com/

PhoneGap is also a good choice if you want to deploy to multiple platforms.

Depending on the application, I'd take a strong look at HTML5 combined with something like jQuery Mobile. Unless your application requires more of the sophisticated resources on the device, this cross platform approach may be appropriate

If it's a game you should consider Shiva3D and Unity.

I always create two aplications, and i try to make them the most equal possible but using always all device functions needed.

write your common code in C++, both platforms support it. for platform dependent code you can create one interface with two different implementation

Related

What is the best strategy for keeping an android and iphone version of the same app

I'm must build the same application for android and iphone.
I tryed rhodes, that is great, but some native ui features are missing...
I would like to know, is there a strategy, sdk, framework, or something for building native applications for android and iphone that somehow reduce the rework?
Or any suggestion of other framework, like rhodes...
Thanks
Phone Gap is the place for you. You should have a look at this http://www.phonegap.com/about
Appcelerator Titanium
http://www.appcelerator.com/products/titanium-mobile-application-development/
Documentation, Documentation, Documentation!
Have a well written PDR and stick to it.
there is another approach which is to use a tool that generates both simultaneously like: phonegap or corona SDK.
Design for some level of resolution independence. Try to code as much as you appropriately can in HTML rather than native controls. And wrap common API calls so you have 1 method to change rather than 100 different calls all over the place.
You could consider using monotouch and monodroid.
You may also want to see Reusing Monotouch code in Monodroid app

Pedometer App for a phone

Where could someone get the code or guidelines to create a universal pedometer app for various phones?
or would you have to create a different app for each phone?
or could you just create an app for android & iphone?
How would a coder go about doing the task? where to look for help?
Titanium Mobile is a cross-platform dev environment that lets you write apps in javascript that are then compiled into native apps for iPhone/iPad and Android. I haven't used it myself, but I've heard that it does not completely suck. I do not know whether it supports the accelerometers in these devices (which would be necessary for a pedometer app), but it probably does.
However, since you'd have to learn a bunch of new stuff just to use Titanium, it might make more sense to just pick a platform and spend your time learning to program it natively (Android has more marketshare now - maybe - so I'd recommend just learning that; Android is much easier to work with than iPhone).
Titanium Mobile does support Accelerometer.
For iPhone, there is an offical library in the framework that will detect steps, but it will only work from iOS7.
Look here: /System/Library/Frameworks/CoreMotion.framework
Please be aware there are restrictions for what kind of Apps can run in the background on an iPhone.

Any idea how to write code that can be easily ported to iphone, android and blackberry?

I'm looking for a way to easily port content driven applications from one mobile platform to another. Currently HTML5+js seems to be the only language that can be easily reused.
Can you share your experience? I'm looking for a way to go forward.
Have you taken a look at Titanium Mobile?
http://www.appcelerator.com/products/titanium-mobile-application-development/
You can build apps for iPhone/iPad & Android using JavaScript - doesn't support blackberry (yet), though.
You are right. HTML5+CSS+JavaScript is a viable and recommended solution for cross-platform mobile apps. If you're already familiar with these technologies there is no reason for you to learn a new one (such as Titanium Mobile as was suggested by someone else).

Developing native applications to run both on Android & iPhone?

I'm new to mobile phones development, but I wonder whether there is any way to develop native apps (HTML-based apps is another story) that would run both on Android and iPhone? I know that there exist applications available for both OSs, so I wonder how are they ported/developed for both targets?
You can simply have two different projects, with same design and graphics, or, you can do it with some frameworks like PhoneGap or Rhomobile.
The best way is to have two different versions of the code, so you can take advantage from the platform that you are using.
http://www.appcelerator.com/
You can share a significant amount of Non-UI logic and code libraries by taking advantage of MonoTouch and MonoDroid. They are native frameworks which provide C# bindings around iPhone's and Androids native APIs. They have the added advantage of being able to develop in C# which IMHO is nicer than Obj-C and Java.

support iphone,ipad,android

develop android apps that should support iphone,ipad,android.is there any way for developing this kind of generic app or we need to develop aps depending on mobile os
Though it is possible to create an universal application for iphone and ipad i don't think you can do the same for Android.
In my opinion it is always better to port your application to Android based on your requirements so that you can take advantages of the API's that the platform is offering you.
You can try using a framework named Titanium Appcelrator. This framework will help you target iPhone, iPad, Android with the same code base. This also lets you access most of the Native hardware features available with these platforms but not all. It seems that this also may support Blackberry soon.
We are struggling with the same question at the moment. Since we are working for Android, Maemo, Meego, iPhone and Blackberry (+Symbian 3 soon), HTML5 looked promising, and we dedicated quite some time investigating it. The end result was HTML5 is not yet ready for the development we were hoping for. It's fine if you need simple functionality, but as soon as something more advanced is needed, you need to create a different version. Even if it suits your needs, every platform requires different HTML5-to-native bridge, and every platform has a different engine. As you can see, only front end part could be partially used.
In your case, you need two different applications, one for Android, another one for iPhone/iPad. Try to see if you could take advantage of HTML5, if not, you are unfortunately stuck with separate development for some time to come. Unless you will create a web app and use it with device's browser.
You can create common functionality libraries with C or C++ and use these libraries in iPhone/iPad and use Android's NDK tool to integrate theses libraries with Android
On Android, you're using Java as the main language, and you can also use C and C++ . On iOS, you're using Objective-C as the main language, and also can use C and C++. So the common denominator would be C (at least on the iPhone there are no C++ GUI classes). I have no idea about developing on Android, but on iPhone it's no fun to purely work in C (and I'm not sure if it's even possible, maybe it is but should I when working with Objective-C/Cocoa is fun).
What you can do is write generic logic and share that between both systems, like a library. For example, I worked on a project where we used a C++ SIP/VoIP library that also compiles and runs on Symbian. It shouldn't be a big problem to write C code that can be shared between iOS and Android, as long as it is mostly about logic and not about calling system-specific stuff (you can of course include system specific stuff and guard that with #ifdef but you don't want your library to have more system-specific than system-agnostic code, I guess). For example, if you intend to write a networked game you could implement the network protocol in a way that could be shared between iOS and Android.
But as soon as you're hitting the GUI level I don't think you can share any code, and even if you could you probably don't want to because if you use the native languages/IDEs you are faster designing the GUIs each in their respective main languages/IDEs than trying to find a common way and then have to live with compromises and trying to make it work on both systems all day long. Better to implement the GUI native to each platform (e.g. Xcode has a very good graphical tool called Interface Builder that can save a lot of work/typing).
we can go for the XML VM to run the android apps in iphone.
Check this for more info.
xmlvm.org