Rajesh
Rajesh

Reputation: 13

Manifest File for Launcher and LockScreen apps

What are enteries in Manifest file that must be present to create a launcher apps and lockscreen apps?

Upvotes: 1

Views: 2780

Answers (1)

AndyFaizan
AndyFaizan

Reputation: 1893

Check out this answer for the lock screen. The manifest for that project is given here

Pasting here for reference:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.lockscreen"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <application
        android:icon="@drawable/lockicon"
        android:label="@string/app_name">
        <activity android:label="@string/app_name"
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
          android:screenOrientation="portrait"
            android:name=".LockScreenAppActivity"
           >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


        <activity
            android:name=".StartLockScreen"
            android:theme="@style/Theme.Transparent" >
            <!--
<intent-filter >
<action android:name="android.intent.action.MAIN" />



<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />


</intent-filter>
--></activity>

        <service android:name=".MyService" >
        </service>

        <receiver
            android:enabled="true"
            android:name="receiver.lockScreenReeiver" >
            <intent-filter >
                <action android:name="android.intent.action.BOOT_COMPLETED" />

            </intent-filter>
        </receiver>
    </application>

    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>


</manifest>

As for the launcher, try the "Home screen replacement sample" provided by the Android team itself. Download it from Android SDK Manager. Choose the "Sample for SDK" option for SDK you need it for. Once downloaded, create new project by following these steps:

File -> New -> Other ->Android -> Android Sample Project -> Android x.x -> Home -> Finish

Home sample project selection

Upvotes: 2

Related Questions