配置AndroidManifest.xml
<h1>配置AndroidManifest.xml</h1>
<h2>权限配置</h2>
<p>备注:由于android 6.0以上部分权限需要动态申请,sdk中需要申请的动态权限包括(ACCESS_FINE_LOCATION,CALL_PHONE,SEND_SMS,READ_EXTERNAL_STORAGE),详情见demo,由于这些权限是sdk运行所必须的,故请在获得权限允许后再执行sdk的YTSDKManager.getInstance(this)等方法,当targetSdkVersion<23时,只需在androidmanifest.xml配置权限即可,如有误差,请以Demo为准</p>
<pre><code>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.CHANGE_NETWORK_STATE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.CHANGE_WIFI_STATE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.CALL_PHONE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.READ_PHONE_STATE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
&lt;uses-permission
android:name=&quot;android.permission.WRITE_SETTINGS&quot;
tools:ignore=&quot;ProtectedPermissions&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.SYSTEM_ALERT_WINDOW&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.GET_TASKS&quot; /&gt; &lt;!-- 在SDCard中创建与删除文件权限 --&gt;
&lt;uses-permission
android:name=&quot;android.permission.MOUNT_UNMOUNT_FILESYSTEMS&quot;
tools:ignore=&quot;ProtectedPermissions&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.READ_LOGS&quot;
tools:ignore=&quot;ProtectedPermissions&quot; /&gt;
&lt;uses-permission android:name=&quot;android.permission.USE_FINGERPRINT&quot; /&gt; &lt;!--指纹权限--&gt;
&lt;uses-permission android:name=&quot;android.permission.MANAGE_FINGERPRINT&quot; tools:ignore=&quot;ProtectedPermissions&quot;/&gt; &lt;!--指纹管理权限--&gt;
&lt;uses-permission android:name=&quot;cn.org.ifaa.permission.USE_IFAA_MANAGER&quot; /&gt; &lt;!--⼈脸权限--&gt;
&lt;uses-permission android:name=&quot;android.permission.USE_FACERECOGNITION&quot; /&gt;
&lt;uses-permission android:name=&quot;oppo.permission.USE_FACE&quot; /&gt; &lt;!--个别⼚商⼈脸权限--&gt;
&lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;&lt;!--相机权限,需要⽤户进⾏授权--&gt;</code></pre>
<h2>application段内配置</h2>
<p>备注:1、sdk不支持横竖屏切换,请在接入时通过setIsPortrait()设置,其中支付界面通用竖屏,请勿修改。
2、Activity中的配置与支付模块有关,以Demo中配置为准,”com.game.sdk”包名开头为sdk定义的页面,其他为支付模块定义的页面,无须修改
3、meta-data中的参数设置,《奇顽游戏入库文档》获取对应的值,BS_AGENT对应的value填写default</p>
<pre><code></code></pre>
<p><activity
android:name="com.game.sdk.module.ui.MergeLoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"></activity>
<activity
android:name="com.game.sdk.module.ui.LoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.game.sdk.module.ui.WxLoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.game.sdk.module.ui.QqLoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.game.sdk.module.ui.ChargeActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.game.sdk.module.ui.FloatActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@style/Theme.MyTheme" />
<activity
android:name="com.game.sdk.module.ui.NoticeActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<!-- 微信支付 start -->
<!-- android 11-->
<!-- <queries>-->
<!-- <package android:name="com.tencent.mm" />-->
<!-- <package android:name="com.eg.android.AlipayGphone" />-->
<!-- </queries>-->
<activity
android:name="com.game.sdk.module.pay.WFTPayActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name="com.swiftfintech.pay.activity.UnifiedPay"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name="com.game.sdk.wxapi.WXEntryActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!-- 微信支付 end -->
<activity
android:name="com.test.sdk.wxapi.WXEntryActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!-- 微信登录 start -->
<activity-alias
android:name="${applicationId}.wxapi.WXEntryActivity"
android:exported="true"
android:targetActivity="com.test.sdk.wxapi.WXEntryActivity" />
<!-- 微信登录 end -->
<!-- 支付宝支付 start -->
<activity
android:name="com.alipay.sdk.app.H5PayActivity"
android:configChanges="orientation|keyboardHidden|navigation"
android:exported="false"
android:screenOrientation="behind"
android:windowSoftInputMode="adjustResize|stateHidden"></activity>
<activity
android:name="com.alipay.sdk.auth.AuthActivity"
android:configChanges="orientation|keyboardHidden|navigation"
android:exported="false"
android:screenOrientation="behind"></activity>
<activity
android:name="com.game.sdk.module.pay.AlipayActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!-- 支付宝支付 end -->
<service android:name="com.game.sdk.manager.YTAppService">
<intent-filter android:priority="1000">
<action android:name="com.game.sdk.manager.YTAppService" /></p>
<pre><code> &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
&lt;/intent-filter&gt;
&lt;/service&gt;
&lt;!-- qq登陆 --&gt;
&lt;activity
android:name=&quot;com.tencent.tauth.AuthActivity&quot;
android:launchMode=&quot;singleTask&quot;
android:noHistory=&quot;true&quot;&gt;
&lt;intent-filter&gt;
&lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
&lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
&lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
&lt;data android:scheme=&quot;tencent101930028&quot; /&gt;
&lt;/intent-filter&gt;
&lt;/activity&gt;
&lt;activity
android:name=&quot;com.tencent.connect.common.AssistActivity&quot;
android:configChanges=&quot;orientation|keyboardHidden&quot;
android:screenOrientation=&quot;behind&quot;
android:theme=&quot;@android:style/Theme.Translucent.NoTitleBar&quot; /&gt;
&lt;!-- oneLogin --&gt;
&lt;!--联通电信授权页--&gt;
&lt;!--如果不需要使用窗口模式,不要使用authsdk_activity_dialog主题,会出现异常动画--&gt;
&lt;!--如果需要使用authsdk_activity_dialog主题,则screenOrientation一定不能指定明确的方向,
比如portrait、sensorPortrait,在8.0的系统上不允许窗口模式指定orientation,会发生crash,需要指定为behind,
然后在授权页的前一个页面指定具体的orientation--&gt;
&lt;activity
android:name=&quot;com.mobile.auth.gatewayauth.LoginAuthActivity&quot;
android:configChanges=&quot;orientation|keyboardHidden|screenSize&quot;
android:exported=&quot;false&quot;
android:launchMode=&quot;singleTop&quot;
android:theme=&quot;@style/authsdk_activity_dialog&quot; /&gt;
&lt;!--二次弹窗界面--&gt;
&lt;activity
android:name=&quot;com.mobile.auth.gatewayauth.PrivacyDialogActivity&quot;
android:configChanges=&quot;orientation|keyboardHidden|screenSize&quot;
android:exported=&quot;false&quot;
android:launchMode=&quot;singleTop&quot;
android:screenOrientation=&quot;behind&quot;
android:theme=&quot;@style/authsdk_activity_dialog&quot; /&gt;
&lt;!--协议页面webview--&gt;
&lt;activity
android:name=&quot;com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity&quot;
android:configChanges=&quot;orientation|keyboardHidden|screenSize&quot;
android:exported=&quot;false&quot;
android:launchMode=&quot;singleTop&quot;
android:screenOrientation=&quot;behind&quot; /&gt;
&lt;activity
android:name=&quot;com.game.sdk.module.ui.OneLoginActivity&quot;
android:configChanges=&quot;fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen&quot;
android:launchMode=&quot;singleTop&quot;
android:screenOrientation=&quot;behind&quot;
android:theme=&quot;@android:style/Theme.Translucent.NoTitleBar.Fullscreen&quot;/&gt;
&lt;activity
android:configChanges=&quot;orientation|keyboardHidden|screenSize|uiMode|fontScale&quot;
android:name=&quot;com.aliqin.mytel.login.OneKeyLoginActivity&quot;
android:screenOrientation=&quot;behind&quot;/&gt;
&lt;provider
android:name=&quot;androidx.core.content.FileProvider&quot;
android:authorities=&quot;${applicationId}.fileprovider&quot;
android:exported=&quot;false&quot;
android:grantUriPermissions=&quot;true&quot;&gt;
&lt;meta-data
android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
android:resource=&quot;@xml/file_paths&quot; /&gt;
&lt;/provider&gt;</code></pre>
<pre><code>&lt;!--此处用于配置BS_APPID,BS_CLIENTID,BS_CLIENTKEY,value具体参数由平台提供
BS_AGENT渠道名称,接入时value的值为default,提供demo中 value为demo_1_123_1
只是测试用的 BS_PF_ID默认为1,BS_DOMAIN默认为 www.84673.com --&gt;
&lt;meta-data android:name=&quot;BS_APPID&quot; android:value=&quot;1&quot; /&gt;
&lt;meta-data android:name=&quot;BS_CLIENTID&quot; android:value=&quot;1&quot; /&gt;
&lt;meta-data android:name=&quot;BS_CLIENTKEY&quot; android:value=&quot;1&quot; /&gt;
&lt;meta-data android:name=&quot;BS_AGENT&quot; android:value=&quot;default&quot; /&gt;
&lt;meta-data
android:name=&quot;BS_QQ_APP_ID&quot;
android:value=&quot;&quot; /&gt; // QQ 登录
&lt;meta-data android:name=&quot;BS_PF_ID&quot; android:value=&quot;1&quot; /&gt;
&lt;meta-data android:name=&quot;BS_DOMAIN&quot; android:value=&quot;&quot; /&gt;
&lt;meta-data android:name=&quot;BS_ONELOGINAPPID&quot; android:value=&quot;&quot; /&gt; // 一键登录</code></pre>
<h2>manifest段内设置适应所有分辨率</h2>
<pre><code>&lt;supports-screens
android:anyDensity=&quot;true&quot;
android:largeScreens=&quot;true&quot;
android:normalScreens=&quot;true&quot;
android:resizeable=&quot;true&quot;
android:smallScreens=&quot;true&quot; /&gt;</code></pre>