update:2020.5.14

fix:兼容Android10.0 http联网问题,静默安装问题
add:
This commit is contained in:
2020-05-14 18:34:36 +08:00
parent eb1f74288c
commit fdbecb973e
13 changed files with 236 additions and 195 deletions

View File

@@ -11,14 +11,11 @@
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.ACTION_SCREEN_ON" />
<uses-permission android:name="android.permission.ACTION_SCREEN_OFF" />
<!-- ##############################极光推送############################## -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- ##############################极光推送############################## -->
<!-- Required -->
<permission
android:name="${JPUSH_PKGNAME}.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" />
<!-- Required -->
android:protectionLevel="signature" /> <!-- Required -->
<uses-permission android:name="${JPUSH_PKGNAME}.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.INTERNET" />
@@ -29,7 +26,6 @@
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission
android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"
android:maxSdkVersion="22" />
@@ -39,11 +35,16 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<receiver
android:name=".utils.InstallResultReceiver"
android:enabled="true"
android:exported="true"></receiver>
<activity
android:name="com.mjsheng.myappstore.activity.MainActivity"
android:name=".activity.MainActivity"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -52,16 +53,15 @@
</intent-filter>
</activity>
<service android:name="com.mjsheng.myappstore.server.MyDownloadService" />
<service android:name="com.mjsheng.myappstore.server.GuardService" />
<service android:name=".server.MyDownloadService" />
<service android:name=".server.GuardService" />
<service
android:name="com.mjsheng.myappstore.server.StepService"
android:name=".server.StepService"
android:exported="true" />
<service android:name="com.mjsheng.myappstore.server.InitJpushServer" />
<service android:name=".server.InitJpushServer" />
<receiver
android:name="com.mjsheng.myappstore.receiver.NewAppReceiver"
android:name=".receiver.NewAppReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
@@ -73,7 +73,7 @@
</intent-filter>
</receiver>
<receiver
android:name="com.mjsheng.myappstore.receiver.BootReceiver"
android:name=".receiver.BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
@@ -87,11 +87,10 @@
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.intent.action.SCREEN_ON" />
<action android:name="android.intent.action.SCREEN_OFF" />
</intent-filter>
</receiver>
<receiver
android:name="com.mjsheng.myappstore.receiver.MyJPushReceiver"
android:name=".receiver.MyJPushReceiver"
android:enabled="true">
<intent-filter>
@@ -108,8 +107,7 @@
<category android:name="${JPUSH_PKGNAME}" />
</intent-filter>
</receiver>
<!-- Required. For publish channel feature -->
</receiver> <!-- Required. For publish channel feature -->
<!-- JPUSH_CHANNEL 是为了方便开发者统计APK分发渠道。 -->
<!-- 例如: -->
<!-- 发到 Google Play 的APK可以设置为 google-play; -->
@@ -131,16 +129,13 @@
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<!-- ##############################极光推送############################## -->
<!-- Rich push 核心功能 since 2.0.6-->
</provider> <!-- ##############################极光推送############################## -->
<!-- Rich push 核心功能 since 2.0.6 -->
<activity
android:name="cn.jpush.android.ui.PopWinActivity"
android:exported="false"
android:theme="@style/MyDialogStyle"
tools:replace="android:exported"></activity>
<!-- Required SDK核心功能-->
tools:replace="android:exported" /> <!-- Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden"
@@ -153,9 +148,7 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.jiaoguanyi.appstore" />
</intent-filter>
</activity>
<!-- Required SDK 核心功能-->
</activity> <!-- Required SDK 核心功能 -->
<!-- 可配置android:process参数将PushService放在其他进程中 -->
<service
android:name="cn.jpush.android.service.PushService"
@@ -167,16 +160,13 @@
<action android:name="cn.jpush.android.intent.PushService" />
<action android:name="cn.jpush.android.intent.PUSH_TIME" />
</intent-filter>
</service>
<!-- since 3.0.9 Required SDK 核心功能-->
</service> <!-- since 3.0.9 Required SDK 核心功能 -->
<provider
android:name="cn.jpush.android.service.DataProvider"
android:authorities="com.jiaoguanyi.appstore.DataProvider"
android:exported="false"
android:process=":pushcore"
tools:replace="android:authorities" />
<!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
tools:replace="android:authorities" /> <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
<!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 -->
<service
android:name="cn.jpush.android.service.DaemonService"
@@ -184,23 +174,21 @@
android:exported="true">
<intent-filter>
<action android:name="cn.jpush.android.intent.DaemonService" />
<category android:name="com.jiaoguanyi.appstore" />
</intent-filter>
</service>
<!-- since 3.1.0 Required SDK 核心功能-->
</service> <!-- since 3.1.0 Required SDK 核心功能 -->
<provider
android:name="cn.jpush.android.service.DownloadProvider"
android:authorities="com.jiaoguanyi.appstore.DownloadProvider"
android:exported="true"
tools:replace="android:authorities" />
<!-- Required SDK核心功能-->
tools:replace="android:authorities" /> <!-- Required SDK核心功能 -->
<receiver
android:name="cn.jpush.android.service.PushReceiver"
android:enabled="true"
android:exported="false">
<intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!--Required 显示通知栏 -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!-- Required 显示通知栏 -->
<category android:name="com.jiaoguanyi.appstore" />
</intent-filter>
<intent-filter>
@@ -214,14 +202,10 @@
<data android:scheme="package" />
</intent-filter>
</receiver>
<!-- Required SDK核心功能-->
</receiver> <!-- Required SDK核心功能 -->
<receiver
android:name="cn.jpush.android.service.AlarmReceiver"
android:exported="false" />
<!--since 3.3.0 Required SDK核心功能-->
android:exported="false" /> <!-- since 3.3.0 Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.service.JNotifyActivity"
android:exported="true"
@@ -229,41 +213,36 @@
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.intent.JNotifyActivity" />
<category android:name="com.jiaoguanyi.appstore" />
</intent-filter>
</activity>
<!-- Since JCore2.0.0 Required SDK核心功能-->
</activity> <!-- Since JCore2.0.0 Required SDK核心功能 -->
<!-- 这个Service要继承JCommonService -->
<service
android:name="com.mjsheng.myappstore.jpush.PushService"
android:name=".jpush.PushService"
android:process=":pushcore">
<intent-filter>
<action android:name="cn.jiguang.user.service.action" />
</intent-filter>
</service>
<!-- User defined. For test only 用户自定义的广播接收器-->
</service> <!-- User defined. For test only 用户自定义的广播接收器 -->
<receiver
android:name="com.mjsheng.myappstore.jpush.MyReceiver"
android:name=".jpush.MyReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTRATION" /> <!--Required 用户注册SDK的intent-->
<action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!--Required 用户接收SDK消息的intent-->
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!--Required 用户接收SDK通知栏信息的intent-->
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!--Required 用户打开自定义通知栏的intent-->
<action android:name="cn.jpush.android.intent.CONNECTION" /><!-- 接收网络变化 连接/断开 since 1.6.3 -->
<action android:name="cn.jpush.android.intent.REGISTRATION" /> <!-- Required 用户注册SDK的intent -->
<action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!-- Required 用户接收SDK消息的intent -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!-- Required 用户接收SDK通知栏信息的intent -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!-- Required 用户打开自定义通知栏的intent -->
<action android:name="cn.jpush.android.intent.CONNECTION" /> <!-- 接收网络变化 连接/断开 since 1.6.3 -->
<category android:name="com.jiaoguanyi.appstore" />
</intent-filter>
</receiver>
<!-- User defined. For test only 用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调-->
<receiver android:name="com.mjsheng.myappstore.jpush.MyJPushMessageReceiver">
</receiver> <!-- User defined. For test only 用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调 -->
<receiver android:name=".jpush.MyJPushMessageReceiver">
<intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="com.jiaoguanyi.appstore"></category>
<category android:name="com.jiaoguanyi.appstore" />
</intent-filter>
</receiver>
@@ -272,10 +251,7 @@
android:value="developer-default" /> <!-- Required. AppKey copied from Portal -->
<meta-data
android:name="JPUSH_APPKEY"
android:value="20f70bbeb78bad23eddd08d0" /><!-- </>值来自开发者平台取得的AppKey-->
<!-- ##############################极光推送end############################## -->
android:value="20f70bbeb78bad23eddd08d0" />
</application>
</manifest>