All About APK File (Android Package)

Friday, August 10, 20120 comments


For those of you Android users must be familiar with the APK file, but do you know about APK file on Android device? How does the APK works? How do I get the APK file? and many more which we will discuss in this article. Let us share.



What is APK?

APK is the Android application package (Android Package). APK is commonly used to store an application or program that will run on Android devices.

APK is basically a compressed file like zip file, because it contains a collection of files. APK can be obtained through various methods, such as installing an application via the Play Store, download from a website then you install it manually, or create and develop your own in a language that most of them used the Java-based.

If you have an APK file on your computer, and want to install it on your android, you can also run the command 'adb install apkname.apk' to install the application via USB to your android device.

APK Introduction

The original APK file included with the ROM, but most of what we know APK means that we install the application from either the development of android developer tools, games or other applications.

APK file on android devices located on the directory /data/app/filename.apk. These directories are usually not accessible, to protect a paid application, unless you have rooted your Android ROM. At rooted ROM, it is possible to copy the application to this folder manually using the command 'adb push' or something. Once a file is located in the directory /data/app, then the application is installed on the device.

In addition, it is also possible to install applications to the system partition of the device that you have root. This method has the advantage that they can not be removed from the device, making it useful for security/anti-theft applications such as WaveSecure and MobileDefense.

System applications will be stored in /system/app. Applications in this folder is usually part of the Android operating system, and should not be altered or deleted unless you know what you are doing.


In the android application development, the concept is used to separate the coding algorithms and coding applications for the display (user interface) applications.

For coding logic (algorithm) android, as I have described above, using a programming language that is 90% similar to the java programming language. Syntax differences may simply lie in the handling of hardware resources.

As for the display settings, using XML android. This concept is inspired from a Web application development using PHP coding for logic and coding for display using html, css and javascript. The advantage of this concept is that if we want to change the look of the application, we just simply change the coding on the part of the application without the need to look too much attention to coding the application logic.

How APK Works?


Android apps started to work when you click (touch) apps on Android devices. Once you click on the application, the system will first check android AndroidManifest.xml file on your project.

In the file, the system will search for android <activity> element defined as the launcher, characterized by an element with an attribute <category>
<category android:name="android.intent.category.LAUNCHER" />

In the concept of android applications there are Java file, the file is a set of application logic in android. Based on the information in AndroidManifest.xml, then this file will be executed first when the user wants to run the application.

In addition there is also a Class file which is a class derived from the Activity class. Class method will be called when the activity is to be run. This means after APK runs as desired, then it will give the appearance of the apps, xml file that will be used to display this activity is on file with the extension. Xml directory located in the folder res/layout/ application on android.


This file is set up the display, in accordance with the parameters given to the method of running and displays.

In addition there is also a file that puts the display UI components (buttons, textview, etc) in sequence based on the writing. As the name suggests, the view is displayed directly written or a reference to a string variable in /res/ values/strings.xml.
Share this article :
Powered by Blogger.
 
Copyright © 2011. Android Tutorials - All Rights Reserved
Proudly powered by Blogger