Skip to content

Commit

Permalink
更新部分三方库版本号,删除友盟和极光
Browse files Browse the repository at this point in the history
  • Loading branch information
maning0303 committed Apr 26, 2021
1 parent 1ba57ae commit 3c97188
Show file tree
Hide file tree
Showing 21 changed files with 492 additions and 995 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
32 changes: 12 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ dependencies {
implementation librarys.cardview
implementation librarys.multidex

/*-----------------------------------------*/

/*Umeng统计*/
implementation 'com.umeng.sdk:common:1.5.3'
implementation 'com.umeng.sdk:analytics:7.5.3'
/*极光推送*/
implementation files('libs/jcore-android_v1.1.2.jar')
implementation files('libs/jpush-android_v3.0.5.jar')


/*-----------------------------------------*/
/*注解*/
implementation 'com.jakewharton:butterknife:10.2.3'
Expand All @@ -142,14 +132,15 @@ dependencies {
/*解析Json*/
implementation 'com.google.code.gson:gson:2.8.5'
/*网络相关*/
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
/*图片加载Glide*/
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'jp.wasabeef:glide-transformations:2.0.2'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'jp.wasabeef:glide-transformations:4.3.0'
/*数据存储*/
implementation 'com.tencent:mmkv-static:1.2.2'
implementation 'com.tencent:mmkv-static:1.2.6'
/*日志*/
implementation 'com.github.zhaokaiqiang.klog:library:1.6.0'
/*下拉刷新框架*/
Expand All @@ -161,7 +152,7 @@ dependencies {
/*解析HTML页面*/
implementation 'org.jsoup:jsoup:1.9.2'
/*权限库*/
implementation 'com.yanzhenjie:permission:2.0.0-rc4'
implementation 'com.github.getActivity:XXPermissions:10.8'
/*ViewPager指示器*/
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
/*菜单*/
Expand All @@ -182,7 +173,7 @@ dependencies {
/* 背景可以移动的View */
implementation 'com.flaviofaria:kenburnsview:1.0.7'
/* 圆形图片 */
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
/* 滚轮选择器 */
implementation 'com.contrarywind:Android-PickerView:3.2.5'
/* 图片选择 */
Expand All @@ -195,9 +186,10 @@ dependencies {
/*-----------------------------------------*/

/*图片浏览*/
implementation 'com.github.maning0303:MNImageBrowser:V1.3.5'
implementation 'com.github.maning0303:MNImageBrowser:V1.3.7'
/*二维码扫描*/
implementation 'com.github.maning0303:MNZXingCode:V2.1.4'
implementation 'com.google.zxing:core:3.3.3'
implementation 'com.github.maning0303:MNZXingCode:V2.1.8'
/*翻滚广告条TextView*/
implementation 'com.github.maning0303:SwitcherView:v1.0.4'
/* 提示框 */
Expand Down
Binary file removed app/libs/jcore-android_v1.1.2.jar
Binary file not shown.
Binary file removed app/libs/jpush-android_v3.0.5.jar
Binary file not shown.
123 changes: 3 additions & 120 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 8.0安装需要的权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- Jpush -->
<permission
android:name="com.maning.gankmm.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" />

<uses-permission android:name="com.maning.gankmm.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
Expand Down Expand Up @@ -45,7 +42,8 @@
android:theme="@style/DayTheme"
android:usesCleartextTraffic="true"
tools:replace="icon,label,theme,allowBackup">
<activity android:name=".ui.activity.tools.ScanResultActivity"></activity>

<activity android:name=".ui.activity.tools.ScanResultActivity"/>

<provider
android:name=".utils.MyFileProvider"
Expand All @@ -55,103 +53,7 @@
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider> <!-- 极光推送 start -->
<!-- Required SDK 核心功能 -->
<!-- 可配置android:process参数将PushService放在其他进程中 -->
<service
android:name="cn.jpush.android.service.PushService"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTER" />
<action android:name="cn.jpush.android.intent.REPORT" />
<action android:name="cn.jpush.android.intent.PushService" />
<action android:name="cn.jpush.android.intent.PUSH_TIME" />
</intent-filter>
</service> <!-- since 1.8.0 option 可选项。用于同一设备中不同应用的JPush服务相互拉起的功能。 -->
<!-- 若不启用该功能可删除该组件,将不拉起其他应用也不能被其他应用拉起 -->
<service
android:name="cn.jpush.android.service.DaemonService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="cn.jpush.android.intent.DaemonService" />

<category android:name="com.maning.gankmm" />
</intent-filter>
</service> <!-- Required SDK核心功能 -->
<receiver
android:name="cn.jpush.android.service.PushReceiver"
android:enabled="true">
<intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />

<category android:name="com.maning.gankmm" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<!-- Optional -->
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />

<data android:scheme="package" />
</intent-filter>
</receiver> <!-- Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.ui.PushActivity" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.maning.gankmm" />
</intent-filter>
</activity> <!-- SDK核心功能 -->
<activity
android:name="cn.jpush.android.ui.PopWinActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:theme="@style/MyDialogStyle">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.maning.gankmm" />
</intent-filter>
</activity> <!-- Required SDK核心功能 -->
<service
android:name="cn.jpush.android.service.DownloadService"
android:enabled="true"
android:exported="false" /> <!-- Required SDK核心功能 -->
<receiver android:name="cn.jpush.android.service.AlarmReceiver" /> <!-- User defined. 用户自定义的广播接收器 -->
<receiver
android:name=".ui.receiver.MyReceiver"
android:enabled="true">
<intent-filter>

<!-- Required 用户注册SDK的intent -->
<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 用户打开自定义通知栏的intent -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" />
<!-- 接收网络变化 连接/断开 since 1.6.3 -->
<action android:name="cn.jpush.android.intent.CONNECTION" />

<category android:name="com.maning.gankmm" />
</intent-filter>
</receiver> <!-- Required . Enable it you can get statistics data with channel -->
<meta-data
android:name="JPUSH_CHANNEL"
android:value="developer-default" />
<meta-data
android:name="JPUSH_APPKEY"
android:value="9154ee1b9e0fac4b4d967222" /> <!-- 极光推送 END -->
</provider>
<activity
android:name=".ui.activity.SplashActivity"
android:screenOrientation="portrait"
Expand All @@ -165,9 +67,6 @@
<activity
android:name=".ui.activity.MainActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.ImagesActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.WebActivity"
android:hardwareAccelerated="false"
Expand All @@ -193,10 +92,6 @@
android:value="48cc89a5931e80321bced46714a03563" />

<service android:name="com.amap.api.location.APSService" />

<activity
android:name=".ui.activity.CitysActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.WeatherActivity"
android:screenOrientation="portrait" />
Expand All @@ -208,11 +103,7 @@
android:screenOrientation="portrait" />
<activity android:name=".ui.activity.MoreActivity" />
<activity android:name=".ui.activity.tools.PhoneAddressActivity" />
<activity android:name=".ui.activity.tools.PostCodeActivity" />
<activity android:name=".ui.activity.tools.IDCardQueryActivity" />
<activity android:name=".ui.activity.tools.IPQueryActivity" />
<activity android:name=".ui.activity.tools.WXArticleActivity" />
<activity android:name=".ui.activity.tools.BankCardActivity" />
<activity android:name=".ui.activity.tools.ChineseCalendarActivity" />
<activity android:name=".ui.activity.tools.OilPriceActivity" />
<activity android:name=".ui.activity.tools.DictionaryActivity" />
Expand All @@ -223,13 +114,6 @@
<activity android:name=".ui.activity.tools.TrainListActivity" />
<activity android:name=".ui.activity.tools.FlightActivity" />
<activity android:name=".ui.activity.tools.FlightListActivity" />
<activity
android:name=".ui.imagebrowser.MNImageBrowserActivity2"
android:screenOrientation="portrait"
android:theme="@style/ImageBrowserTheme" />
<activity android:name=".ui.activity.tools.CarListActivity"></activity>
<activity android:name=".ui.activity.tools.CarItemsActivity"></activity>
<activity android:name=".ui.activity.tools.CarDetailActivity"></activity>
<activity android:name=".ui.activity.tools.CookMenuActivity"></activity>
<activity android:name=".ui.activity.tools.CookListActivity"></activity>
<activity android:name=".ui.activity.tools.CookDetailsActivity"></activity>
Expand All @@ -241,7 +125,6 @@
<activity android:name=".ui.activity.login.EditUserInfoActivity"></activity>
<activity android:name=".ui.activity.login.EditSignatureActivity"></activity>
<activity android:name=".ui.activity.login.ForgetPsdActivity"></activity>
<activity android:name=".ui.activity.CollectActivity"></activity>
<activity android:name=".ui.activity.OpenFrameActivity"></activity>
</application>

Expand Down
49 changes: 0 additions & 49 deletions app/src/main/java/com/maning/gankmm/app/MyApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
import com.readystatesoftware.chuck.ChuckInterceptor;
import com.socks.library.KLog;
import com.tencent.mmkv.MMKV;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;

import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;

import cn.jpush.android.api.JPushInterface;
import okhttp3.Cache;
import okhttp3.CacheControl;
import okhttp3.Interceptor;
Expand Down Expand Up @@ -58,62 +55,16 @@ public void onCreate() {
//初始化Log
initLog();

//Jpush
initJpush();

//初始化异常捕获
initCrash();

//Umeng统计相关
initUmeng();

//开启违例检测:StrictMode
if (BuildConfig.LOG_DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());
}

}

private void initUmeng() {
//禁止默认的页面统计方式
MobclickAgent.openActivityDurationTrack(false);
//获取渠道
String channel = ChannelReaderUtil.getChannel(getApplicationContext());
if(TextUtils.isEmpty(channel)){
channel = "gankmm_bd";
}
/**
* 初始化common库
* 参数1:上下文,不能为空
* 参数2:友盟 app key
* 参数3:友盟 channel
* 参数4:设备类型,UMConfigure.DEVICE_TYPE_PHONE为手机、UMConfigure.DEVICE_TYPE_BOX为盒子,默认为手机
* 参数5:Push推送业务的secret
*/
UMConfigure.init(this, "56dce179e0f55ac5d700046c", channel, UMConfigure.DEVICE_TYPE_PHONE, "");
/**
* 设置组件化的Log开关
* 参数: boolean 默认为false,如需查看LOG设置为true
*/
UMConfigure.setLogEnabled(BuildConfig.LOG_DEBUG);
}

private void initLog() {
KLog.init(BuildConfig.LOG_DEBUG, "---GankMM---");
}


private void initJpush() {
try {
JPushInterface.setDebugMode(BuildConfig.LOG_DEBUG);
JPushInterface.init(this);
} catch (Exception e) {
KLog.e();
}

}

private void initBase() {
application = this;
mHandler = new Handler();
Expand Down
Loading

0 comments on commit 3c97188

Please sign in to comment.