小米适配,刷脸bug修复
This commit is contained in:
@@ -74,35 +74,29 @@ public class App extends Application {
|
||||
}
|
||||
}
|
||||
|
||||
PendingIntent pendingIntent =
|
||||
PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
Cactus.getInstance()
|
||||
.isDebug(true)
|
||||
//可选,设置通知栏点击事件
|
||||
.setPendingIntent(pendingIntent)
|
||||
// .setBackgroundMusicEnabled(true)//可选,退到后台是否可以播放音乐
|
||||
// .setMusicId(R.raw.main) //可选,设置音乐
|
||||
// .setPendingIntent(pendingIntent)//可选,设置通知栏点击事件
|
||||
// .addCallback(new CactusCallback())//可选,运行时回调
|
||||
.setCrashRestartUIEnabled(true) //可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||
.setCrashRestartUIEnabled(true)//可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||
.setTitle("大河好运")
|
||||
.setSmallIcon(R.drawable.diver_logo)
|
||||
.addBackgroundCallback(new CactusBackgroundCallback() {
|
||||
@Override
|
||||
public void onBackground(boolean b) {
|
||||
// String s = "";
|
||||
if (b){
|
||||
ToastUtils.showToast(mApplication,"推到后台了");
|
||||
getBillLocation();
|
||||
}
|
||||
|
||||
// else
|
||||
// s = "跑到前台啦";
|
||||
// ToastUtils.showToast(mApplication,s);
|
||||
}
|
||||
})
|
||||
.register(this);
|
||||
// PendingIntent pendingIntent =
|
||||
// PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
// Cactus.getInstance()
|
||||
// .isDebug(true)
|
||||
// //可选,设置通知栏点击事件
|
||||
// .setPendingIntent(pendingIntent)
|
||||
//// .setBackgroundMusicEnabled(true)//可选,退到后台是否可以播放音乐
|
||||
//// .setMusicId(R.raw.main) //可选,设置音乐
|
||||
//// .setPendingIntent(pendingIntent)//可选,设置通知栏点击事件
|
||||
//// .addCallback(new CactusCallback())//可选,运行时回调
|
||||
// .setCrashRestartUIEnabled(true) //可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||
// .setCrashRestartUIEnabled(true)//可选,设置奔溃可以重启,google原生rom android 10以下可以正常重启
|
||||
// .setTitle("大河好运")
|
||||
// .setSmallIcon(R.drawable.diver_logo)
|
||||
// .addBackgroundCallback(new CactusBackgroundCallback() {
|
||||
// @Override
|
||||
// public void onBackground(boolean b) {
|
||||
// if (b){
|
||||
// getBillLocation();
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// .register(this);
|
||||
}
|
||||
|
||||
public static App getApp() {
|
||||
|
||||
@@ -133,7 +133,8 @@ class MainActivity : BaseAppCompatActivity() {
|
||||
PermissionX.init(this)
|
||||
.permissions(Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||
Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
Manifest.permission.ACCESS_BACKGROUND_LOCATION,
|
||||
Manifest.permission.CAMERA)
|
||||
.request { allGranted, grantedList, deniedList ->
|
||||
if (allGranted) {
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import java.util.Set;
|
||||
* @description:
|
||||
*/
|
||||
public class Md5Util {
|
||||
static String app_key="3d4c1b5592f9ae09";
|
||||
static String appSecret="642cc46b385264595df7cce271250a1cb782b39c";
|
||||
static String app_key="1000055";
|
||||
static String appSecret="4e0d1be81540c4d1f0868d329b3229467f071f6c";
|
||||
static String[] strs={"app_key","deviceId","longitude","latitude","keyword","timestamp","format","v","sign_method","session","sign"};
|
||||
static String[] strsDel={"app_key","deviceId","openshopid","timestamp","format","v","sign_method","session","sign"};
|
||||
public static String resUrl(String longitude,String latitude,String keyword){
|
||||
@@ -35,7 +35,7 @@ public class Md5Util {
|
||||
requestParam.put("format", "json");
|
||||
requestParam.put("v", "1");
|
||||
requestParam.put("sign_method", "MD5");
|
||||
requestParam.put("session", "cb2007c78d055247f7f242760173268caef1183a");
|
||||
requestParam.put("session", "c1fc1773a27d47e988725bc6df150626dbda0b4d");
|
||||
requestParam.put("sign", generateSign(requestParam,appSecret,"MD5"));
|
||||
str+="?";
|
||||
for(int i=0;i<requestParam.size();i++){
|
||||
|
||||
Reference in New Issue
Block a user