version:2.1.0

update:
fix:更换应用之后删除原来的应用,加入获取哦log的服务,修复禁止升级的应用也会被卸载
add:
This commit is contained in:
2021-06-03 17:41:52 +08:00
parent 6cd1442f46
commit ee11b63068
20 changed files with 732 additions and 366 deletions

View File

@@ -25,20 +25,17 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.SHUTDOWN" />
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE"/>
<uses-permission android:name="android.permission.DELETE_CACHE_FILES"/>
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE" />
<uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- 静默安装权限 -->
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- 静默安装权限 -->
<uses-permission
android:name="android.permission.INSTALL_PACKAGES"
tools:ignore="ProtectedPermissions" /> <!-- 应用卸载权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission
android:name="android.permission.DELETE_PACKAGES"
tools:ignore="ProtectedPermissions" />
<!-- ##############################极光推送############################## -->
tools:ignore="ProtectedPermissions" /> <!-- ##############################极光推送############################## -->
<!-- Required -->
<permission
android:name="${JPUSH_PKGNAME}.permission.JPUSH_MESSAGE"
@@ -59,13 +56,10 @@
android:maxSdkVersion="22" />
<uses-permission
android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
android:maxSdkVersion="23" />
<!-- 高德地图 -->
android:maxSdkVersion="23" /> <!-- 高德地图 -->
<!-- 用于进行网络定位 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- 用于访问GPS定位 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- 用于获取运营商信息,用于支持提供运营商信息相关的接口 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 用于访问GPS定位 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 用于获取运营商信息,用于支持提供运营商信息相关的接口 -->
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
<!-- 用于访问wifi网络信息wifi信息会用于进行网络定位 -->
<!-- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> -->
@@ -78,14 +72,12 @@
<!-- 用于写入缓存数据到扩展存储卡 -->
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
<!-- 用于申请调用A-GPS模块 -->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<!-- 如果设置了target >= 28 如果需要启动后台定位则必须声明这个权限 -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- 如果您的应用需要后台定位权限且有可能运行在Android Q设备上,并且设置了target>28必须增加这个权限声明 -->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <!-- 如果设置了target >= 28 如果需要启动后台定位则必须声明这个权限 -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- 如果您的应用需要后台定位权限且有可能运行在Android Q设备上,并且设置了target>28必须增加这个权限声明 -->
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<application
android:name="com.mjsheng.myappstore.base.BaseApplication"
android:name=".base.BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@@ -93,10 +85,13 @@
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<service
android:name=".server.LogcatService"
android:enabled="true"
android:exported="true"></service>
<activity android:name="com.mjsheng.myappstore.activity.TopActivity" />
<activity android:name="com.mjsheng.myappstore.activity.HomeActivity">
<activity android:name=".activity.TopActivity" />
<activity android:name=".activity.HomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -104,26 +99,27 @@
</intent-filter>
</activity>
<activity
android:name="com.mjsheng.myappstore.activity.MainActivity"
android:name=".activity.MainActivity"
android:excludeFromRecents="true"
android:launchMode="singleTop">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
<activity
android:name="com.mjsheng.myappstore.activity.DiscardActivity"
android:name=".activity.DiscardActivity"
android:excludeFromRecents="true"
android:launchMode="singleTop" />
<!-- <service android:name=".server.MyDownloadService" />-->
<service android:name="com.mjsheng.myappstore.server.GuardService" />
android:launchMode="singleTop" /> <!-- <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.MainService"
android:name=".server.MainService"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
@@ -133,16 +129,13 @@
<data android:scheme="package" />
</intent-filter>
</service>
<!-- <service-->
<!-- android:name=".server.InitJpushServer"-->
<!-- android:enabled="true"-->
<!-- android:exported="true">-->
<!-- </service>-->
</service> <!-- <service -->
<!-- android:name=".server.InitJpushServer" -->
<!-- android:enabled="true" -->
<!-- android:exported="true"> -->
<!-- </service> -->
<receiver
android:name="com.mjsheng.myappstore.receiver.NewAppReceiver"
android:name=".receiver.NewAppReceiver"
android:enabled="true"
android:exported="true"
android:permission="com.example.broadcast.permission">
@@ -155,11 +148,11 @@
</intent-filter>
</receiver>
<receiver
android:name="com.mjsheng.myappstore.utils.InstallResultReceiver"
android:name=".utils.InstallResultReceiver"
android:enabled="true"
android:exported="true" />
<receiver
android:name="com.mjsheng.myappstore.receiver.BootReceiver"
android:name=".receiver.BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
@@ -188,8 +181,7 @@
<!-- 自定义广播 -->
<action android:name="com.jiaoguanyi.appstore.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<!-- <receiver android:name=".log.LogReceiver" -->
</receiver> <!-- <receiver android:name=".log.LogReceiver" -->
<!-- android:permission="android.permission.DUMP" > -->
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.BOOT_COMPLETED" /> -->
@@ -201,7 +193,7 @@
<!-- </intent-filter> -->
<!-- </receiver> -->
<receiver
android:name="com.mjsheng.myappstore.receiver.MyJPushReceiver"
android:name=".receiver.MyJPushReceiver"
android:enabled="true">
<intent-filter>
@@ -218,8 +210,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; -->
@@ -241,15 +232,13 @@
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<!-- ##############################极光推送############################## -->
</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" />
<!-- Required SDK核心功能 -->
tools:replace="android:exported" /> <!-- Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden"
@@ -262,8 +251,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"
@@ -275,15 +263,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"
@@ -294,14 +280,12 @@
<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"
@@ -322,12 +306,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"
@@ -338,19 +320,17 @@
<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>
@@ -366,9 +346,8 @@
<!-- 接收网络变化 连接/断开 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" />
@@ -378,20 +357,18 @@
<meta-data
android:name="JPUSH_CHANNEL"
android:value="developer-default" />
<!-- Required. AppKey copied from Portal -->
android:value="developer-default" /> <!-- Required. AppKey copied from Portal -->
<meta-data
android:name="JPUSH_APPKEY"
android:value="${JPUSH_APPKEY}" />
<!-- 高德地图 -->
android:value="${JPUSH_APPKEY}" /> <!-- 高德地图 -->
<!-- 设置key -->
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="${AMAP_KEY}" />
<!-- 定位需要的服务 适配Android Q需要加上android:foregroundServiceType="location" -->
android:value="${AMAP_KEY}" /> <!-- 定位需要的服务 适配Android Q需要加上android:foregroundServiceType="location" -->
<service
android:name="com.amap.api.location.APSService"
android:foregroundServiceType="location" />
<meta-data
android:name="CHANNEL_VALUE"
android:value="${channel_value}" />