Android development is current buzz in Java programming world. It’s the Android, which keeps Java in the fore front from last couple of years.
How important is to understand or learn Android for Java programmers?
If you like application development and want to reach mass, Android offers that opportunity to you. Millions of Android phones are available and they are keep increasing, with pace, much higher than IPhone or iOS.
Example: IDE like Eclipse to develop Android applications, Google provides Eclipse plug-in for Android development.
How Android works
Android uses Java for application development. So you can code your Android apps using Java API provided by Google, and it compiles into class files. Similarity ends here, Android doesn’t use Java Virtual machine (JVM) for executing class files, instead it uses Dalvik virtual machine, which is not a true JVM and doesn’t operate on Java byte code. In order to run on Dalvik Virtual machines, class files are further compiled into DEX format. After conversion to DEX format, class files along with other resources are bundled into Android Package (APK) for distribution and installation into various devices.
How Android apps runs on Device
Android application runs in isolation with other, but they can certainly request access to hardware and other system resources. If you are familiar with mobile application development, may be in J2ME, then you may know about permissions. So when an android application is installed or started, it request necessary permission required to connect internet, phone book and other system resource. User explicitly provides grant these permissions, or it may deny. All these permissions are defined in manifest file of Android application. Unlike Java Manifest file, Android manifest is an XML file, which lists all the components of apps, and settings for those components.
Four major components of Android application development is Activities, Services, Content Providers and Broadcast Receivers.
For example, An Android Game, you can have multiple screens for login, high score, instructions and game screen. Each of these screen represent different Activities inside your app.
Similar to Java, good thing about Android is that it manages certain task on behalf of developer, one of them is creating activity object.
Activities are managed by System, when you want to start an activity, you call startActivity () method which takes an Intent object. In response to this call, System can either create new activity object or reuse an existing one. Just like Garbage collection in Java, manages a critical task or reclaiming memory, Android manages starting, stopping, creating and destroying of apps by themselves.
That’s all on How Android works. Android is definitely worth learning for Java programmer, as it uses Java, you can reuse your existing knowledge of Java programming techniques, design patterns and best practices to code a good android app.