Home » Default » 在AndroidManifest.xml中注册广播接收器BootBroadcastReceiver

<?xmlversion="1.0"encoding="utf-8"?>

<manifestxmlns:Android="http://schemas.Android.com/apk/res/Android"

package="com.gk.my12306"> 

<uses-permissionAndroid:name="Android.permission.GET_ACCOUNTS"/>

<uses-permissionAndroid:name="Android.permission.READ_PROFILE"/>

<uses-permissionAndroid:name="Android.permission.READ_CONTACTS"/>

<uses-permissionAndroid:name="Android.permission.CHANGE_CONFIGURATION"/>

<uses-permissionAndroid:name="Android.permission.WRITE_SETTINGS"/>

<uses-permissionAndroid:name="Android.permission.ACCESS_NETWORK_STATE"/> 

<application

Android:allowBackup="true"

Android:icon="@mipmap/ic_launcher"

Android:label="@string/app_name"

Android:roundIcon="@mipmap/ic_launcher_round"

Android:supportsRtl="true"

Android:theme="@style/AppTheme">

<activityAndroid:name=".MainActivity">

<intent-filter>

<actionAndroid:name="Android.intent.action.MAIN"/> 

<categoryAndroid:name="Android.intent.category.LAUNCHER"/>

</intent-filter>

</activity>

<activity

Android:name=".LoginActivity"

Android:label="@string/title_activity_login"

Android:windowSoftInputMode="adjustPan"/> 

<receiverAndroid:name=".BootBroadcastReceiver">

<intent-filter>

<actionAndroid:name="Android.intent.action.BOOT_COMPLETED"/>

</intent-filter>

</receiver>

</application> 

</manifest>

标签: none

添加新评论

V