<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.uiui.zyappstore"
    android:sharedUserId="android.uid.system">

    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.DELETE_PACKAGES" />
    <uses-permission android:name="android.permission.MASTER_CLEAR" />
    <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
    <!-- 系统权限，有系统签名可以使用 -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.uiui.zyappstore.permission.JPUSH_MESSAGE" />

    <!-- 【必须】 移动推送 TPNS SDK VIP版本所需权限 -->
    <permission
        android:name="com.uiui.zyappstore.permission.XGPUSH_RECEIVE"
        android:protectionLevel="signature" />
    <uses-permission android:name="com.uiui.zyappstore.permission.XGPUSH_RECEIVE" />

    <!-- 【必须】 移动推送 TPNS SDK 所需权限 -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />

    <!-- 【常用】 移动推送 TPNS SDK所需权限 -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.GET_TASKS" />

    <application
        android:name="com.uiui.zyappstore.base.BaseApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:networkSecurityConfig="@xml/network"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/ImmerseTheme">
        <activity android:name="com.uiui.zyappstore.activity.ClassAppActivity" />
        <activity android:name="com.uiui.zyappstore.activity.MoreAppActivity" />
        <activity android:name="com.uiui.zyappstore.activity.ManagerAppActivity" />
        <activity
            android:name="com.uiui.zyappstore.activity.MainActivity"
            android:configChanges="keyboardHidden|screenSize"
            android:exported="true">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
                <!--                <action android:name="android.intent.action.MAIN" />-->

                <!--                <category android:name="android.intent.category.LAUNCHER" />-->
            </intent-filter>
        </activity>
        <activity
            android:name="com.uiui.zyappstore.activity.PrivacyPolicyActivity"
            android:launchMode="singleTask"
            android:screenOrientation="portrait" />
        <activity
            android:name="com.uiui.zyappstore.activity.UserAgreementActivity"
            android:launchMode="singleTask"
            android:screenOrientation="portrait" />
        <activity
            android:name="com.uiui.zyappstore.activity.CopyrightActivity"
            android:screenOrientation="behind" />
        <activity
            android:name="com.uiui.zyappstore.activity.AboutActivity"
            android:screenOrientation="behind" />
        <activity
            android:name="com.uiui.zyappstore.activity.SearcherActivity"
            android:screenOrientation="behind" />
        <activity
            android:name="com.uiui.zyappstore.activity.HintActivity"
            android:launchMode="singleTask"
            android:screenOrientation="sensor"
            android:theme="@style/activity_styles" />
        <activity
            android:name="com.uiui.zyappstore.activity.KindDetailActivity"
            android:screenOrientation="behind" />
        <activity
            android:name="com.uiui.zyappstore.activity.DetailsActivity"
            android:screenOrientation="behind" />
        <activity
            android:name="com.uiui.zyappstore.activity.LocalManagerActivity"
            android:screenOrientation="behind" />
        <activity
            android:name="com.uiui.zyappstore.activity.DownloadManagerActivity"
            android:screenOrientation="behind" />

        <service android:name="com.uiui.zyappstore.service.GuardService" />
        <service android:name="com.uiui.zyappstore.service.StepService" />
        <service android:name="com.uiui.zyappstore.service.DownloadService" />
        <service
            android:name="com.uiui.zyappstore.service.main.MainService"
            android:enabled="true"
            android:exported="true" />

        <receiver
            android:name="com.uiui.zyappstore.receiver.BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="com.uiui.zyappstore.receiver.AppManagerReceiver"
            android:enabled="true"
            android:exported="true"
            android:permission="com.example.broadcast.permission">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <action android:name="android.intent.action.PACKAGE_REPLACED" />
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
                <action android:name="android.intent.action.USER_PRESENT" />
                <action android:name="android.intent.action.BATTERY_CHANGED" />

                <data android:scheme="package" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="com.uiui.zyappstore.receiver.InstallResultReceiver"
            android:enabled="true"
            android:exported="true" />
        <receiver
            android:name="com.uiui.zyappstore.receiver.NewAppReceiver"
            android:enabled="true"
            android:exported="true"
            android:permission="com.example.broadcast.permission">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <action android:name="android.intent.action.PACKAGE_REPLACED" />
                <action android:name="android.intent.action.PACKAGE_REMOVED" />

                <data android:scheme="package" />
            </intent-filter>
        </receiver>

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.uiui.zyappstore.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

        <activity
            android:name="com.tencent.android.tpush.TpnsActivity"
            android:exported="true"
            android:launchMode="singleInstance"
            android:theme="@android:style/Theme.Translucent.NoTitleBar">
            <intent-filter>
                <action android:name="${applicationId}.OPEN_TPNS_ACTIVITY" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <data
                    android:host="${applicationId}"
                    android:scheme="tpns" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.tencent.android.tpush.InnerTpnsActivity"
            android:exported="false"
            android:launchMode="singleInstance"
            android:theme="@android:style/Theme.Translucent.NoTitleBar">
            <intent-filter>
                <action android:name="${applicationId}.OPEN_TPNS_ACTIVITY_V2" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <data
                    android:host="${applicationId}"
                    android:scheme="stpns" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action" />
            </intent-filter>
        </activity>

        <!-- 【必须】 信鸽receiver广播接收 -->
        <receiver
            android:name="com.tencent.android.tpush.XGPushReceiver"
            android:exported="false"
            android:process=":xg_vip_service">
            <intent-filter android:priority="0x7fffffff">

                <!-- 【必须】 信鸽SDK的内部广播 -->
                <action android:name="com.tencent.android.xg.vip.action.SDK" />
                <action android:name="com.tencent.android.xg.vip.action.INTERNAL_PUSH_MESSAGE" />
                <action android:name="com.tencent.android.xg.vip.action.ACTION_SDK_KEEPALIVE" />
            </intent-filter>
        </receiver>

        <!-- 【必须】移动推送 TPNS service -->
        <service
            android:name="com.tencent.android.tpush.service.XGVipPushService"
            android:persistent="true"
            android:process=":xg_vip_service" />
        <!-- 【必须】通知 service ，android:name 部分改为包名.XGVIP_PUSH_ACTION -->
        <service
            android:name="com.tencent.android.tpush.rpc.XGRemoteService"
            android:exported="false">
            <intent-filter>
                <!-- 【必须】请修改为当前APP名包.XGVIP_PUSH_ACTION -->
                <action android:name="com.uiui.zyappstore.XGVIP_PUSH_ACTION" />
            </intent-filter>
        </service> <!-- 【必须】【注意】authorities 修改为包名.XGVIP_PUSH_AUTH -->
        <provider
            android:name="com.tencent.android.tpush.XGPushProvider"
            android:authorities="com.uiui.zyappstore.XGVIP_PUSH_AUTH" />

        <!-- 【必须】【注意】authorities 修改为包名.TPUSH_PROVIDER -->
        <provider
            android:name="com.tencent.android.tpush.SettingsContentProvider"
            android:authorities="com.uiui.zyappstore.TPUSH_PROVIDER" />

        <!-- 【可选】用于增强保活能力 -->
        <provider
            android:name="com.tencent.android.tpush.XGVipPushKAProvider"
            android:authorities="com.uiui.zyappstore.AUTH_XGPUSH_KEEPALIVE"
            android:exported="true"
            tools:replace="android:exported" />

        <!-- 【可选】APP实现的Receiver，用于接收消息透传和操作结果的回调，请根据需要添加 -->
        <!-- YOUR_PACKAGE_PATH.CustomPushReceiver需要改为自己的Receiver： -->
        <receiver android:name="com.uiui.zyappstore.push.tpush.MessageReceiver">
            <intent-filter>
                <!-- 接收消息透传 -->
                <action android:name="com.tencent.android.xg.vip.action.PUSH_MESSAGE" />
                <!-- 监听注册、反注册、设置/删除标签、通知被点击等处理结果 -->
                <action android:name="com.tencent.android.xg.vip.action.FEEDBACK" />
            </intent-filter>
        </receiver>

        <!-- MQTT START -->
        <service
            android:name="com.tencent.tpns.mqttchannel.services.MqttService"
            android:exported="false"
            android:process=":xg_vip_service" />

        <provider
            android:name="com.tencent.tpns.baseapi.base.SettingsContentProvider"
            android:authorities="com.uiui.zyappstore.XG_SETTINGS_PROVIDER"
            android:exported="false" />
        <!-- MQTT END -->

        <!-- 消息接收监听器 （用户可自主扩展） -->
        <receiver
            android:name=".push.alipush.AliyunMessageReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alibaba.sdk.android.push.RECEIVE" />
            </intent-filter>
        </receiver>

        <service
            android:name=".push.alipush.AliMessageIntentService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alibaba.sdk.android.push.RECEIVE" />
            </intent-filter>
        </service>

        <!-- 【必须】 请修改为 APP 的 AccessId，“15”开头的10位数字，中间没空格 -->
        <meta-data
            android:name="XG_V2_ACCESS_ID"
            android:value="1500033122" />
        <!-- 【必须】 请修改为APP的AccessKey，“A”开头的12位字符串，中间没空格 -->
        <meta-data
            android:name="XG_V2_ACCESS_KEY"
            android:value="A5QBQVQ7KLQD" />

        <!-- 请填写你自己的- appKey -->
        <meta-data
            android:name="com.alibaba.app.appkey"
            android:value="333816246" />
        <!-- 请填写你自己的appSecret -->
        <meta-data
            android:name="com.alibaba.app.appsecret"
            android:value="b8cdbee64b5a4d1a8e212924ee71b0d3" />
    </application>

</manifest>