2014-05-22 44 views
0

Manifest文件中必須存在哪些輸入以創建啓動器應用程序和鎖定屏幕應用程序?適用於Launcher和LockScreen應用程序的清單文件

+0

退房[this](http://stackoverflow.com/questions/16911049/create-custom-lockscreen-for-android-4-0-or-above)鎖定屏幕的答案。該項目的清單在這裏給出(https://github.com/Joisar/LockScreenApp/blob/master/LockScreenApp/AndroidManifest.xml) – AndyFaizan

回答

0

檢出退出this答案爲鎖定屏幕。該項目的清單給出here

粘貼在這裏以供參考:

<?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> 

至於發射器,試圖通過Android團隊本身提供的「主屏幕更換樣本」。從Android SDK Manager下載。爲您需要的SDK選擇「SDK for sample」選項。下載完成後,按照以下步驟創建新項目:

文件 - >新建 - >其他 - > Android的 - > Android的示例項目 - > Android的XX - >首頁 - >完成

Home sample project selection

相關問題