AndroidManifest.xml 15.7 KB
<?xml version="1.0" encoding="utf-8"?><!-- 清单文件合并指引:https://developer.android.google.cn/studio/build/manifest-merge?hl=zh-cn -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.studymachine.www">

    <!-- 网络相关 -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <!-- 外部存储 -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- 拍照权限 -->
    <uses-permission android:name="android.permission.CAMERA" />

    <!-- 安装权限 -->
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

    <!-- 定位权限(用于 WebView 定位)-->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name= "android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name= "android.permission.SYSTEM_OVERLAY_WINDOW"  />

    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-feature android:name="android.hardware.usb.host" />

    <!-- Application 节点详解:https://developer.android.google.cn/guide/topics/manifest/application-element -->
    <!-- Activity 节点详解:https://developer.android.google.cn/guide/topics/manifest/activity-element -->
    <application
        android:name="com.studymachine.www.app.AppApplication"
        android:allowBackup="false"
        android:icon="@mipmap/launcher_ic"
        android:label="${app_name}"
        android:largeHeap="true"
        android:networkSecurityConfig="@xml/network_security_config"
        android:requestLegacyExternalStorage="true"
        android:resizeableActivity="true"
        android:roundIcon="@mipmap/launcher_ic"
        android:supportsRtl="false"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:ignore="AllowBackup,LockedOrientationActivity"
        tools:replace="android:allowBackup,android:supportsRtl"
        android:extractNativeLibs="true"
        >

        <service
            android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"
            android:label="dexopt"
            android:process=":dexopt" />

        <!-- 表示当前已经适配了分区存储 -->
        <meta-data
            android:name="ScopedStorage"
            android:value="true" />
<!--        <meta-data-->
<!--            android:name="com.rokid.uxr.application.mode"-->
<!--            android:value="3d" />-->
<!--        <meta-data-->
<!--            android:name="com.rokid.uxr.sdk.version"-->
<!--            android:value="10900" />-->

        <!-- 适配 Android 7.0 文件意图 -->
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>


        <activity
            android:name=".ui.activity.SwfActivity"
            android:process=":flash"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            <meta-data
                android:name="namespaceVersion"
                android:value="32" />
            <meta-data
                android:name="autoOrients"
                android:value="true" />
            <meta-data
                android:name="fullScreen"
                android:value="true" />
            <meta-data
                android:name="initialcontent"
                android:value="cached.swf" />
            <meta-data
                android:name="containsVideo"
                android:value="false" />
            <meta-data
                android:name="embeddedFonts"
                android:value="false" />
            <meta-data
                android:name="webContentsDebuggingEnabled"
                android:value="false" />
            <meta-data
                android:name="disableMediaCodec"
                android:value="false" />

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

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="com.softboy.flashairtest" />
            </intent-filter>

        </activity>


        <!-- 闪屏页 -->
        <activity
            android:name="com.studymachine.www.ui.activity.SplashActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:theme="@style/SplashTheme">
            <!-- 程序入口 -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- 无网络页 -->
        <activity
            android:name="com.studymachine.www.ui.activity.NoNetworkActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:theme="@style/TransparentTheme" />

        <!-- 外置浏览器界面 -->
        <activity
            android:name="com.studymachine.www.ui.activity.ExternalBrowserActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:theme="@style/TransparentTheme" />

        <!-- 首页 -->
        <activity
            android:name="com.studymachine.www.ui.activity.HomeActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />
        <!-- 首页 -->
        <activity
            android:name="com.studymachine.www.ui.activity.SwitchInfoActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- 学情档案详情 -->
        <activity
            android:name="com.studymachine.www.ui.activity.RecordDetailActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />
        <!-- 学情档案 -->
        <activity
            android:name="com.studymachine.www.ui.activity.RecordActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- 知识竞技列表 -->
        <activity
            android:name="com.studymachine.www.ui.activity.ArenaListActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- ai列表 -->
        <activity
            android:name="com.studymachine.www.ui.activity.AiListActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- ai详情 -->
        <activity
            android:name="com.studymachine.www.ui.activity.AiDetailActivity"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- 精准强化列表 -->
        <activity
            android:name="com.studymachine.www.ui.activity.AccurateListActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- 精准强化详情 -->
        <activity
            android:name="com.studymachine.www.ui.activity.AccurateDetailActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan" />

        <!-- 登录页 -->
        <activity
            android:name="com.studymachine.www.ui.activity.LoginActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />

        <!-- 注册页 -->
        <activity
            android:name="com.studymachine.www.ui.activity.RegisterActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />
        <!-- 协议-->
        <activity
            android:name="com.studymachine.www.ui.activity.AgreementActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />
        <!-- 注册页 选择年级-->
        <activity
            android:name="com.studymachine.www.ui.activity.RegisterGradeActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />
        <!-- 注册页 选择教材-->
        <activity
            android:name="com.studymachine.www.ui.activity.RegisterTextbookActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />
        <!-- 注册页 公众号二维码-->
        <activity
            android:name="com.studymachine.www.ui.activity.RegisterWechatActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />
        <!-- 注册页 选择虚拟形象-->
        <activity
            android:name="com.studymachine.www.ui.activity.RegisterPersonActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden">

        </activity>
        <!-- 忘记密码 -->
        <activity
            android:name="com.studymachine.www.ui.activity.PasswordForgetActivity"
            android:label="@string/password_forget_title"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="stateHidden" />
        <!-- 崩溃展示(必须在独立进程) -->
        <activity
            android:name="com.studymachine.www.ui.activity.CrashActivity"
            android:launchMode="singleTop"
            android:process=":crash"
            android:screenOrientation="landscape" />

        <!-- 重启应用(必须在独立进程) -->
        <activity
            android:name="com.studymachine.www.ui.activity.RestartActivity"
            android:launchMode="singleTop"
            android:process=":restart" />

        <!-- 个人资料 -->
        <activity
            android:name="com.studymachine.www.ui.activity.PersonalCenterActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape" />

        <!-- 常见问题 -->
        <activity
            android:name="com.studymachine.www.ui.activity.CommonProblemActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:theme="@style/TransparentTheme" />

        <activity
            android:name="com.studymachine.www.ui.activity.BrowserActivity"
            android:launchMode="singleTop"
            android:screenOrientation="landscape" />

        <!-- 拍照选择 -->
        <activity
            android:name="com.studymachine.www.ui.activity.CameraActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait" />

        <!-- 图片裁剪 -->
        <activity
            android:name="com.studymachine.www.ui.activity.ImageCropActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait" />

        <!-- 图片选择 -->
        <activity
            android:name="com.studymachine.www.ui.activity.ImageSelectActivity"
            android:label="@string/image_select_title"
            android:launchMode="singleTop"
            android:screenOrientation="portrait" />

        <!-- 查看大图 -->
        <activity
            android:name="com.studymachine.www.ui.activity.ImagePreviewActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait" />

        <!-- 播放视频(自适应方向) -->
        <activity
            android:name="com.studymachine.www.ui.activity.VideoPlayActivity"
            android:launchMode="singleTop"
            android:theme="@style/FullScreenTheme" />

        <!-- 播放视频(竖屏方向) -->
        <activity
            android:name="com.studymachine.www.ui.activity.VideoPlayActivity$Portrait"
            android:launchMode="singleTop"
            android:screenOrientation="portrait"
            android:theme="@style/FullScreenTheme" />

        <!-- 播放视频(横屏方向) -->
        <activity
            android:name="com.studymachine.www.ui.activity.VideoPlayActivity$Landscape"
            android:launchMode="singleTop"
            android:screenOrientation="landscape"
            android:theme="@style/FullScreenTheme" />

        <!-- 选择视频 -->
        <activity
            android:name="com.studymachine.www.ui.activity.VideoSelectActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait" />


        <!-- 微信回调(请注意这个 Activity 放置的包名要和当前项目的包名保持一致,否则将不能正常回调) -->
        <activity
            android:name="com.studymachine.www.wxapi.WXEntryActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:exported="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

    </application>

    <!-- Android 11 软件包可见性适配:https://www.jianshu.com/p/d1ccd425c4ce -->
    <queries>
        <!-- 拍照意图:MediaStore.ACTION_IMAGE_CAPTURE -->
        <intent>
            <action android:name="android.media.action.IMAGE_CAPTURE" />
        </intent>

        <!-- 拍摄意图:MediaStore.ACTION_VIDEO_CAPTURE -->
        <intent>
            <action android:name="android.media.action.VIDEO_CAPTURE" />
        </intent>

        <!-- 图片裁剪意图 -->
        <intent>
            <action android:name="com.android.camera.action.CROP" />
        </intent>

        <!-- 打电话意图:Intent.ACTION_DIAL -->
        <intent>
            <action android:name="android.intent.action.DIAL" />
        </intent>

        <!-- 调起分享意图:Intent.ACTION_SEND -->
        <intent>
            <action android:name="android.intent.action.SEND" />
        </intent>

        <!-- 调起其他页面意图:Intent.ACTION_VIEW -->
        <intent>
            <action android:name="android.intent.action.VIEW" />
        </intent>

        <!-- 调起系统文件选择器:Intent.ACTION_GET_CONTENT -->
        <intent>
            <action android:name="android.intent.action.GET_CONTENT" />
        </intent>
    </queries>

</manifest>