Android vs. iOS

When the iPhone was first unveiled, a new sort of business model was established for consumer electronics. While Steve Jobs and his friends at Apple were not the first to invent the touchscreen, they were able to create a new type of software enterprise that was personable and utilitarian. Apple’s “there’s an app for that” slogan has proven to users that the mobile software that they need should be readily available where and when they need it. It works for the smartest engineer and the dumbest consumer, and it has created a new type of software market.

As of this writing, Apple is a monster when it comes to apps. In fact, there is a little bit of a legal suit on who has the rights to the word app, and I’m guessing that it won’t be settled by the time this has been published. Android may not currently have the high numbers that Apple has, but its market is ever-growing.

In February 2011, Google CEO Eric Schmidt stated that Android activations reached about 350,000 per day. At a recent I/O developer conference last May, it was revealed that there were 400,000 new activations per day, not to mention 450,000 developers and 215 carriers. That is about 100 million total activations overall as of May 2011. In comparison, Steve Jobs stated in March 2011, during his presentation of the iPad 2, that over 100 million iPhones have been activated. It would appear that Android’s 100 million devices in May 2011 means that Android is catching up quickly. In short, the Android market is presently booming, and if any software has a chance to eclipse Apple’s huge dominance over the app industry, it’s Android.

When Steve Jobs announced the iPad 2, he ribbed that Honeycomb only had 100 applications while the iPad had hundreds of thousands. That figure was slightly biased, as Honeycomb had been around for only one month. Also, many Android smartphone applications work on Honeycomb.

As a developer, you should know how Android compares to iOS at least at some level. Apple iOS is a proprietary operating system, while Android is open source, which means it gives users the right to use, study, change, and improve design through ready availability of the source code. It uses the Linux kernel software for all of its versions. This is different from iOS, which works only on Mac products. This is one of the reasons why the Android operating system is so popular on smartphones and tablets, and will probably have a significant presence in televisions in the near future: it is not required to be tied to any particular device manufacturer.

Another way that Android differs from Apple is that Android has no approval process when it comes to apps. Once the user has signed up, uploading and publishing becomes a relatively simple process. (This is different for when you submit to Amazon’s Android market, and we will discuss Amazon’s approval process in later chapters.)

Also, you should know that Google reserves the right to yank your application off Android Market, even after you are already on it. A lot of applications are removed due to NSFW (not-suitable-for-work) content, but they can easily be yanked for other reasons as well.

Porting Difficulties

For those who want to turn their iOS app into a full-fledged Android application (or vice versa), I want to let you know the process and pitfalls.

If you haven’t written an app for iOS, you might want to skip this section if you are thinking that you just want to market your application for the Android Market. However, I’m going under the assumption that you are trying to monetize as much as possible, so you might consider turning your Android application into an iOS application. I will cover how to do that by the end of this chapter.

Let’s say you’ve written an iOS app that is out right now, or perhaps waiting in the app approval process. To turn it into an Android application, you will have to adapt your software so that an executable program can be created for a computing environment that is different from the one that it was originally designed for. This is known as porting.

Most of the iOS apps on the iTunes Store are written in Objective-C, while Android is specifically Java and XML. Although the logic of these programming languages is quite similar, as they are both linear, procedural, and use notions of object orientation (OO), they are very different with respect to OS support, GUI objects, and application life cycle. Sadly, Objective-C is not supported on Android.

As far as I can tell, there doesn’t seem to be some magical program that will allow you to insert iPhone apps in and get Android applications out (unless you use development tools that have this in mind from the beginning). I will take a moment to talk about cross-platform development tools later, but let me discuss what you can do for both Android and iOS.

Your iOS coding cannot be reused for Android coding, but it does not mean that you have to rewrite all your Android code from scratch. For example, you can completely reuse the icons and images, as well as any SQLite database code.

Generally, it usually takes the same amount of effort to port an iOS app to Android as it does to create it. Hopefully it will take less time, but I can’t guarantee that. It really depends on how big the application is, as well as the complexity of the code, reliance on GUI tools, and the ability of the developer.

By the way, there are people who make it their business to program apps, and that could lighten your workload. The same case exists for those who are into porting iOS apps to Android applications.

If you have written your iOS app in ANSI C or C++, such as in the many gaming engines that come out for such a purpose, then you are in luck. Android has the Native Development Kit (NDK), which allows for ANSI C or C++ code to be used with a Java layer for interface. If you go with the NDK, you will not have to use the Android SDK, which I will describe later.

Examples of Cross-Platform Development Tools

Chances are you want your application to be downloaded as much as possible, which means that you probably want it to be on many devices as possible. If you want to have your application on both iOS and Android, as well as other mobile platforms, you are going to have to do this from the beginning with certain cross-platform development kits.

Allow me to explain that I cannot testify to the success of such programs as these. I believe that the application market is headed in the direction where one developer’s toolkit will work for all platforms, but, as explained before, we are not quite there yet. For the sake of the subject matter of this book, I only discuss how to use the Java JDK (Java Development Kit), the Android SDK, and the Eclipse IDE (integrated development environment) to construct Android applications. I will explain these programs later, but I wanted to discuss a few cross-platforms development kits, just so you know that there are alternatives.

Livecode

Livecode is the work of RunRev, a company that creates development tools. In the words of Ben Beaumont, product manager for RunRev, Livecode is “a multi-platform element environment that [has] now been moved to the mobile space.” Livecode was originally made for Mac, Windows, and Linux, and it boasts “compile-free coding.” Compile-free coding means that when you make a change to your program, you will see it as you are programming. This is different then the usual method of editing, compiling, running, and debugging.

Livecode also has a visual development environment, where the user can drag and drop the objects and images that will make up the final interface. The user can then attach scripts to these objects to really bring them to life, as well as lend them speed. Livecode uses a very high-level language, which allows the user to write in code that is very close to English. This allows you to write in this code easily, and the code will be easier to read. All this allows for the creation of live prototypes that actually run on the device, and promises to make it easy to work with clients, as you can more directly show them what you want, rather than showing them stagnant code.

Appcelerator

Titanium has created a free and open source application development platform that allows the user to create native mobile, tablet, and desktop application experiences. Their Appcelerator program allows the user to build applications full of features, as if they were written in Objective-C or Java. The end results are native apps that are customizable with a lot of features, all built with the web technology of JavaScript.

They allow developers to concentrate on building the application and provide a toolset for many platforms.

appMobi XDK

appMobi’s mobile app development XDK is made for web developers. appMobi’s claim is that if you can build an application for the web using HTML, CSS, and JavaScript, then you can build it as an application on the iPhone, the iPad, and Android smartphones and pads. According to their appMobi, developers can develop robust, 100 percent native API–compliant mobile applications in hours using preferred editors, and write once to deploy for all target platforms.

XDK includes an onscreen emulator with simple, approachable tool palettes to simulate user interaction with a testing device. It also allows you to send your application project over a local Wi-Fi connection or upload to the cloud to test it from anywhere. As a warning, you will need Java 6 and Google Chrome 6.0 to even begin running this program.

appMobi also offers a service known as MobiUs, which allows any app publisher to offer its app from anywhere on the Web, which could mean the end of frustrating and complicated processes of submission and approval to traditional app distributors (and also the end of developers needing to share their profits with these distributors). It is also cloud-based, which means it is possible to create iPhone apps on a Windows PC and Android applications on a Mac.

PhoneGap

According to its web site, PhoneGap allows users to build apps with web standards based on HTML 5. PhoneGap users can also access native APIs in order to create applications for multiple platforms, including iOS, Android, Windows, BlackBerry, webOS, and more. PhoneGap is currently in version 1.0.0.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.149.223