Android manifest files generally include a single <manifest> tag with a single <application> tag.The following is a sample AndroidManifest.xml file for an application called Multimedia:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidbook.multimedia" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".MultimediaMenuActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action. MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
<activity android:name="AudioActivity"></activity> <activity android:name="StillImageActivity"></activity> <activity android:name="VideoPlayActivity"></activity> <activity android:name="VideoRecordActivity"></activity> </application> <uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.SET_WALLPAPER" /> <uses-permission android:name="android.permission.CAMERA"></uses-permission> <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="8"> </uses-sdk> <uses-feature android:name="android.hardware.camera" /> </manifest>
Here's a summary of what this file tells us about the Multimedia application:
■ The application uses the package name com.androidbook.multimedia.
■ The application version name is 1.0.
■ The application version code is 1.
■ The application name and label are stored in the resource string called @string/app_name within the /res/values/strings.xml resource file.
■ The application is debuggable on an Android device.
■ The application icon is the graphic file called icon (could be a PNG, JPG, or GIF) stored within the /res/drawable directory (there are actually multiple versions for different pixel densities).
■ The application has five activities (MultimediaMenuActivity, AudioActivity, StillImageActivity, VideoPlayActivity, and VideoRecordActivity).
■ MultimediaMenuActivity is the primary entry point for the application.This is the activity that starts when the application icon is pressed in the application drawer.
■ The application requires the following permissions to run: the ability to record audio, the ability to set the wallpaper on the device, the ability to access the built-in camera, and the ability to write settings.
■ The application works from any API level from 3 to 8; in other words,Android SDK 1.5 is the lowest supported, and the application was written to target Android 2.2.
■ Finally, the application requires a camera to work properly.
Now let's talk about some of these important configurations in detail.
Was this article helpful?
Here's How Anyone Can Start, Build and Run their Own Successful Software Empire Without Knowing the First Thing About Programming, Scripting Or Any 'Coder' Stuff. There is no doubt about it software sells. Software has a high percieved value and it solves problems for people. A claim that can't always be made for PDF books, Video products and the like.