Skip to content

Commit

Permalink
DEMO编译运行
Browse files Browse the repository at this point in the history
  • Loading branch information
microshow committed Aug 2, 2021
1 parent 9814964 commit 1cd7036
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 37 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ dependencies {
//极速版 (预计占用 4M 左右空间),主要移除了一些不常用的编解码器
implementation 'com.github.microshow:RxFFmpeg:4.9.0-lite'
//定制版,如果觉得库太占空间,不需要太多功能,需要对APK瘦身,可以压缩到1.5M左右,可联系作者
//迷你版 (预计占用 1.5M 左右空间),主打压缩裁剪等基础通用功能,属于付费定制版,可联系作者
implementation 'xxx.xxx.xxx'
}
Expand Down
22 changes: 11 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ android {
}
}

dataBinding {
enabled = true
buildFeatures {
dataBinding = true
// for view binding :
// viewBinding = true
}

compileOptions {
Expand All @@ -70,7 +72,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.cardview:cardview:1.0.0'

//动态权限
Expand All @@ -80,19 +82,17 @@ dependencies {
implementation 'com.baidu.mobstat:mtj-sdk-circle:3.9.3.9'

//友盟统计
api 'com.umeng.umsdk:analytics:8.1.6'
api 'com.umeng.umsdk:common:2.1.0'
api 'com.umeng.umsdk:utdid:1.1.5.3'
//友盟 PushSDK
api 'com.umeng.umsdk:push:6.0.1'
implementation 'com.umeng.umsdk:common:9.4.0'// 必选
implementation 'com.umeng.umsdk:asms:1.2.3'// 必选
implementation 'com.umeng.umsdk:apm:1.4.0' // 错误分析升级为独立SDK,看crash数据请一定集成,可选

//lottie
implementation 'com.airbnb.android:lottie:3.4.0'

//agentweb
implementation 'com.just.agentweb:agentweb:4.1.2'// (必选)
implementation 'com.just.agentweb:filechooser:4.1.2'// (可选)
implementation 'com.download.library:Downloader:4.1.2'// (可选)
implementation 'com.github.Justson.AgentWeb:agentweb-core:v4.1.9-androidx' // (必选)
implementation 'com.github.Justson.AgentWeb:agentweb-filechooser:v4.1.9-androidx' // (可选)
implementation 'com.github.Justson:Downloader:v4.1.9-androidx' // (可选)

//leakcanary 内存泄露检测
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name=".App"
Expand Down
37 changes: 18 additions & 19 deletions app/src/main/java/io/microshow/rxffmpeg/app/utils/UmengHelper.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.microshow.rxffmpeg.app.utils;

import android.content.Context;
import android.util.Log;

import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.message.IUmengRegisterCallback;
import com.umeng.message.PushAgent;
//import com.umeng.message.IUmengRegisterCallback;
//import com.umeng.message.PushAgent;

/**
* UmengHelper 友盟
Expand All @@ -28,22 +27,22 @@ public static void initUMConfigure(Context context) {
*/
UMConfigure.setLogEnabled(false);
UMConfigure.init(context, UMENG_APP_KEY, "", UMConfigure.DEVICE_TYPE_PHONE, UMENG_MESSAGE_SECRET);
//友盟push
PushAgent mPushAgent = PushAgent.getInstance(context);
mPushAgent.setDisplayNotificationNumber(0);
// 注册推送服务,每次调用register方法都会回调该接口
mPushAgent.register(new IUmengRegisterCallback() {
@Override
public void onSuccess(String deviceToken) {
//注册成功会返回device token
Log.e(TAG, "mPushAgent.register onSuccess ======deviceToken======" + deviceToken);
}

@Override
public void onFailure(String s, String s1) {
Log.e(TAG, "mPushAgent.register onFailure " + s + s1);
}
});
// //友盟push
// PushAgent mPushAgent = PushAgent.getInstance(context);
// mPushAgent.setDisplayNotificationNumber(0);
// // 注册推送服务,每次调用register方法都会回调该接口
// mPushAgent.register(new IUmengRegisterCallback() {
// @Override
// public void onSuccess(String deviceToken) {
// //注册成功会返回device token
// Log.e(TAG, "mPushAgent.register onSuccess ======deviceToken======" + deviceToken);
// }
//
// @Override
// public void onFailure(String s, String s1) {
// Log.e(TAG, "mPushAgent.register onFailure " + s + s1);
// }
// });
}

public static void onResume(Context context) {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
Expand All @@ -21,7 +21,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url "https://jitpack.io" }
}
}
Expand Down

0 comments on commit 1cd7036

Please sign in to comment.