support iphone,ipad,android - iphone

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

Related

Compiling an iPhone XCode project to work on Android

I have an iPhone app which is written in XCode and is currently selling on the iTunes app store. I want to be able to release it for the Android market. Is there any way to compile my app from XCode to work on the Android operating system. I don't really want to learn a new language and completely rewrite my app, so was wondering if there is an easier way.
There isn't any way to compile Android apps from Xcode, and i strongly doubt that Apple would introduce such a feature - if it's even technically possible to do. Sorry.
But if you have Objective C down, you shouldn't have to much problems understanding Java (which is used for creating Android apps).
Check the link below for a pretty comprehensive guide to start learning java and code for the Android platform:
http://mobile.tutsplus.com/tutorials/android/java-tutorial/
Good luck!
No, in general you can't do this. Even if assuming Objective-C can be compiled/converted into Java (which is most likely will not be true for times to come), you'll need to rewrite UI part; then most of OS APIs are different too. There are several features that iOS has that Android lacks or does not have open API for it, or has limited API, or has conceptually different or just different API.
Its just easier to move some of your iOS code into C/C++ shared library and then make sure that it compiles and works on both platforms. And then make platform dependent pieces separately for each platform (UI, hardware related stuff, etc.). This way you'll have at least part of your code shared.

Developing mobile C# app to run on multiple platforms

We have an line-of-business app that runs on Windows Mobile. It's a Winforms app with a local SQL CE database and gets its data from a WCF Web Service running on the server.
Now customers are always asking "why don't you make a version for iPhone/iPad/Android/Phone 7 etc". My boss asked how hard this would be. My initial answer is very hard especially since I would probably be the only person doing the work. I don't have any experience outside my Visual Studio happy place.
Now I've come across MonoTouch and MonoDroid. They appears to offer an easy solution but I'm sure there are lots of issues. I doubt that I will be able to just compile my app for Android.
I'm inclined to suggest that it would be far too much work and that the only realistic solution is a mobile web site with several versions of each page for different screen resolutions. Unfortunately the existing app has a local database and is "sometimes connected" so that won't cut it.
Any suggestions and tips before I waste a huge amount of time?
Cheers
Mark
I doubt that I will be able to just compile my app for Android
That is correct; you won't.
So, background: the design philosophy of MonoTouch and Mono for Android is to bring the "core" .NET and C# experience to iOS and Android while also exposing the underlying features of each specific platform. Whereas PhoneGap and Titanium abstract the underlying platform (for a "write-once, run-anywhere" vibe), MonoTouch and Mono for Android provide no platform abstractions and directly expose the underlying platform types and members.
The result is that MonoTouch programs use MonoTouch.UIKit.UIButton, which directly wraps the underlying CocoaTouch UIButton type.
Similarly, Mono for Android programs would use Android.App.Activity, which directly wraps the underlying Android android.app.Activity type.
Common across both platforms are the "core" framework namespaces and types which you find on .NET, .NET CF, Silverlight, Windows Phone 7, and Mono: System, System.Collections.Generic, System.Linq (yes, Linq-to-Objects), System.Xml.Linq (yes, Linq-to-XML), System.IO, etc., etc. For example, see the assemblies included in Mono for Android.
So, can you use your existing Windows Mobile app as-is on Android? No, because Mono for Android doesn't provide System.Windows.Forms.
However, it should be possible for you to refactor your existing code to follow a Model/View/Controller design pattern (or MVVM, or...), abstracting away the UI (View) so that you can replace it for various platforms, e.g. an iOS UI with MonoTouch, a WP7 UI with XAML, an Android UI with Mono for Android, an HTML UI with ASP.NET MVC, etc., etc. You won't get a "write once, run anywhere" experience, but you will be able to provide the user with native user interfaces which are consistent with their chosen platform.
For example, see the MIX11 Conference Apps, which utilize a common code base while providing platform-specific UIs for iOS, Android, and WP7.
look at titanium and phonegap.
My suggestion is to have a quick look at WP7. It's quite easy to jump in to, even more so if you have Visual Studio (which you do) and C# experience of any sorts. Then you should be able to more easily guesstimate how long it would take you to develop a C# application (and possibly port that to Android using MonoDroid).
And yes, Titanium & PhoneGap are options, but I personally think MonoDroid looks better.
What platform are you getting the most requests for? I am guessing Android, as that seems the most likely. I have seen a lot of people saying MonoDroid is really solid.

Mobile App - Targeting iPhone, WP7, Android, and Blackberry

Is there a sane way to develop a cross platform Mobile app? We want these to be native apps on each platform, and not necessarily some kind of web page.
Currently we're thinking to split it into two languages:
C# backend (business logic)
--> Standard C# app for WP7
--> App built on MonoTouch for iPhone/iPad/etc.
Java backend (business logic)
--> Standard Android Java app (MonoDroid version of C# not ready
yet)
--> Standard Blackberry Java app
We could also develop initially in C# and use one of the conversion tools out there to get our C# converted into Java as a starting point.
Is there another approach? Our skillsets include mainly include a strong C# .Net background, and minor Java experience.
We don't really want to go low level and use something like C/C++ to get the job done. These are usually going to be simple LOB applications that communicate to some web service.
Side Question: how do game devs like the makers of Angry Birds do it?
UPDATE:
MonoDroid is now officially released. So it seems you would only need to use Java for the BlackBerry. We are considering not developing for BlackBerry at all, because developing for the other 3 platforms has been simplified. There is definitely some cost involved, as MonoTouch and MonoDroid are both $399 and you would also need a license for Visual Studio (this doesn't include cost for App store, etc.).
There's no good simple answer that I know of for all mobile platforms. You can use development environments like Appcelerator Titanium, which cross-compile to native code on various platforms (right now, for instance, I think Titanium supports iOS and Android, with plans for Blackberry). However, these usually have a limited API that you have access to, and you still end up needing to design different UIs for the different platforms (in my commercial work, I have never successfully used such a platform)
You could also design all the business logic in a web-services back end, and then just write "thin client" apps for each platform. This works, but of course requires network access when the end user wants to use your app. (Usually it'll be there, but sometimes may not)
Ultimately, I usually end up doing what you propose -- writing the basic business logic in a couple of different languages as generically as possible, and then bundling that in with custom UI/device code for each platform. Haven't found a better way myself....
(BTW, I believe games like Angry Birds are written largely in OpenGL and then loaded onto the OpenGL processor on each platform. But I could be mistaken...)
Those are some great answers. I agree, x-platform development is still very primitive. I'd like to add 2 points:
1) You do not need to write your backend in different languages. Choose one language (based on your comfort level, performance etc. criteria) and then connect from your platform-specific apps directly to the backend. If your backend is server-side code, one way of talking to it would be via XmlHttpClient. If it's a piece of native code common across various apps and is written in say C++, you can use JNI from Java and wrapper assembly from C#.
2) Another reason for avoiding x-platform tools is that you'd always need to wait for them to support the new APIs released by the platform vendor (Apple, Google, MSFT etc.). Once these companies release new APIs, the tools will need to be updated and only then will you be able to use the new APIs.
I don't think this is (easily) possible, if you're not using some HTML5 (jquerymobile etc.) in a WebView in your own app (looks like a real app, but still you will somehow see that it's not) instead of the normal browser. You can still use some native API from the device (accelerometer,...).
There are (commercial) platforms like Sybase Unwired Platform that help you in generating some client code. Afaik for Blackberry and Windows Mobile even some UI can be generated out of the business objects on the server. But to me it sounds that this might be too heavy-weight for your case.
Regards,
Martin

Make Phone Applications Across All Operating Systems [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Write once deploy on Windows Mobile 6, Windows Phone 7, Android and iPhone?
Currently I have created a 2 simple apps for iphone and 1 for windows phone. When I go to promote these apps they usually....well do you have this for android or blackberry or whatever.
Do I have to rewrite my applications in every environment in order to have them compatible across all the operating systems out there? Is there tools that address this or do you guys simply recreate the app in eclipse, xcode, visual studio etc..?
Complex applications generally need to be created with the native environment.
Simple applications can be created with cross platform tools like Titanium and PhoneGap:
- http://www.appcelerator.com/
- http://www.phonegap.com/
#Fraggle (see comment)
I have quite some experience with Appcelerator Titanium. The choice for native v.s. cross-plafrom completely depends on the kind of application you need and your knowledge. General considerations:
Can the application be created with web technologies like HTML, CSS and JavaScript?
What language / environment do I know the best (native vs web technologies)?
How much time and money can I spend?
Do I really need cross-platform compatibility?
Most mobile phone applications only provide an easy interface for internet services like news updates, traffic info, social media and video. Those applications can be easily written with web technologies. Therefor most mobile applications can be written with tools like Titanium. The great thing about Titanium: Get the native experience on multiple devices while only maintaining one code-base. Cheap way of developing cross-platform applications.
Many developers use Titanium because they don't know the native language (objective-C / java), but they have extensive knowledge about web technologies. This way they can create pretty nice applications without learning new languages. Titanium is actually used for many non-cross-platform applications.
Complex graphics, device specific tools and complex interfaces still require the native environment.
Native applications will always perform better and use device specific features, but do you really need that degree of perfection? Yes, develop native applications for every device. No, simply create one cross-platform application.
Check this page to see what Titanium can do:
http://www.appcelerator.com/showcase/applications-showcase/
You may be able to use a third party tool like http://www.phonegap.com.
There are many options for cross-platform app development, but I would suggest Adobe AIR as it is also supported on the Blackberry Playbook by RIM. As far as I know, it's the only cross-platform runtime that is supported by a major platform owner.
I have also seen it do well on Android, and iOS support is also advertized.
Well there are definitely some supposed "write once, run everwhere" solutions out there. Here is one from RhoMobile which specializes in this space. But that is just what a quick Google search turned up. I haven't tried any of them.
I had an app that was developed for Android, and I ended up essentially re-writing it in Objective-C when I wanted to port it over to iPhone. It worked out pretty well and took less time than I thought (considering I hadn't done any iPhone programming prior). But now of course I have 2 code bases that I have to maintain and when I add features I'll have to do it for both the Android and iPhone version.
So having a single code base that lets me build apps for multiple platforms would be great. Do any of the tools out there work well? Not sure. Do they give you full control to make your app look and operate the way you want it, and make us of all the OS's features? Not sure.
Qt (now owned by Nokia) is another provider of a cross platform mobile framework
http://qt.nokia.com/
Even though iphone and android seem to be missing from their official Supported Platforms list I think there is an Android 2.3 release just around the corner. Qt for Iphone also seems to be in the works.
HTML5 may be one solution if the app you providing is simple enough. Google is doing it this way. Otherwise, even you have anything "cross-phone" it may still feels alien.

Do i have to buy mac for iphone application development?

Is there any MacOS virtual machine that can run on PC?
Is there any source to get it?
What is the best way to develop apps for iphone?
Yes all the developer tools are OSX only.
There are lots of iPhone development books out there go check out amazon and find one with some good reviews and that will get you started.
You might not, in the strictest terms, have to get a Mac to develop for iPhone; but it will be extremely helpful. Apple is relatively talented at squashing efforts directed towards Hackintoshes and virtual machines running OS X.
The shortest answer that will give you the least hassle is: Yes you need a Mac.
But, as far as I know there are a few possibilites, that try to reimplement some Cocoa Frameworks (however they might be Mac OS X only and not iPhone): GNUStep is an example.
But I don't think you get something aquivalent to Xcode (the IDE for iPhone development) this way.
And I think there are some OSX86 Virtual Machines (however these seem to be against Apple's EULA and thus seem to be clearly illegal so I won't point you anywhere to get them).
So to conclude - if you want to develop for iPhone: getting a Mac is the easiest way, even though not cheap.
Hope this helps.
The short answer is - yes.
One possibility for learning some of what you need to know before getting a Mac is GNUstep.
However, GNUstep is mainly useful for learning Objective C, especially since it provides many of the classes that the Cocoa toolkit for iPhone does. This can be run on Windows.
It doesn't, however, support some of the key 2.0 language features that are used 'all the time' in any sample code.
What it will allow you to do is design a UI using their UI designer GORM, and use a near-identical message-based system for implementing a UI, and you could theoretically write Objective C classes in GNUstep and then use them on iPhone.
However, to compile an app for iPhone you basically need to have a Mac, because then you can get the key for signing an app, etc. Since you need to get a Mac at some point, there's really little point in going the much harder route of using GNUstep first and learning a more limited implementation, unless you really need to get started before funds are available.
Despite the new SDK terms that can other programming languages, if you're really wanting to start without a Mac, I'd probably be tempted to look at something like Unity, or perhaps even Appcelerator Titanium, and figuring out all the non-platform-specific logic first on whatever platform (Unity has a free version that can be run on Windows, for example).
I'm not that big a fan of xcode, but is is far and a way the best IDE for Objective C development simply because there's almost nothing else out there.
There are, as always, other options. If you do a web app type project, you can implement the website and test a lot of it in a browser. Furthermore, since Android and iPhone browsers are both WebKit based, you can use the free Android SDK to see what pages look like on a comparable mobile device. And since you can use C and C++ classes as well as Objective C (N.B. not for the GUI, since that needs the Objective C extensions for messaging between objects), another option for making a start without a Mac would be to use Eclipse, QT Creator or some other C/C++ IDE to implement non-GUI classes, so long as you make sure you don't use platform-specific libraries.
But the end of the long answer is still that whatever you do, to compile a proper iPhone app you'll be using xcode and associated tools to finally build it and sign it, and so you need a Mac in the end. If you want to create something targetting the iPhone and won't have access to a Mac, then perhaps you're best off looking at creating an iPhone-adapted website using iui or a similar toolkit to give the site a suitable look and feel.