Android一键锁屏开发全过程【源码+附图】(2)

4、AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>    <manifest xmlns:android="http://schemas.android.com/apk/res/android"         package="cn.hnu"         android:versionCode="1"         android:versionName="1.0">        <application android:icon="@drawable/icon" android:label="@string/app_name">            <activity android:name=".LockFirst"                     android:label="@string/app_name">                <intent-filter>                    <action android:name="android.intent.action.MAIN" />                    <category android:name="android.intent.category.LAUNCHER" />                </intent-filter>            </activity>            <!-- 设备管理 -->            <receiver android:name=".AdminReceiver"                     android:label="@string/app_name"                     android:description="@string/app_name"                     android:permission="android.permission.BIND_DEVICE_ADMIN">                    <meta-data android:name="android.app.device_admin"                              android:resource="@xml/lock_screen" />                       <intent-filter>                            <action                               android:name="android.app.action.DEVICE_ADMIN_ENABLED" />                       </intent-filter>            </receiver>        </application>               </manifest>   

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wydgfz.html