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

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="28" />

    <uses-permission
        android:name="android.permission.AUTHENTICATE_ACCOUNTS"
        android:maxSdkVersion="22" />
    <uses-permission
        android:name="android.permission.GET_ACCOUNTS"
        android:maxSdkVersion="22" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

    <application
        android:allowBackup="true"
        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity android:name="com.mn.keeplive.MainActivity" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <!-- 1像素保活 -->
        <activity
            android:name="com.mn.keeplive.activity.KeepActivity"
            android:excludeFromRecents="true"
            android:theme="@style/KeepTheme" />

        <!-- 前台服务保活 -->
        <service android:name="com.mn.keeplive.service.ForegroundService" />
        <service android:name="com.mn.keeplive.service.ForegroundService$InnerService" />

        <!-- START_STICKY 拉活 -->
        <service android:name="com.mn.keeplive.StickyService" />

        <!-- 账户拉活 -->
        <service android:name="com.mn.keeplive.account.AuthenticationService" >
            <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>

            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/account_authenticator" />
        </service>

        <!-- JobScheduler 拉活，需要隐式权限 -->
        <service
            android:name="com.mn.keeplive.jobscheduler.MyJobService"
            android:permission="android.permission.BIND_JOB_SERVICE" />
    </application>

</manifest>