Sfoglia il codice sorgente

Merge branch 'sheep_develop' of 10.8.230.114:xmy_android/small_sheep_android into sheep_develop

hanjing 7 anni fa
parent
commit
5cfbc1e04d

+ 2 - 1
app/build.gradle

@@ -358,7 +358,8 @@ dependencies {
     implementation files('libs/BaiduLBS_Android.jar')
 
     //幂动科技
-    implementation files('libs/mdsdk_1123_1.2.1.12.jar')
+//    implementation files('libs/mdsdk_1123_1.2.1.12.jar')
+    implementation files('libs/mdsdk_1115_1.2.1.9.jar')
 
     //轮播图
     implementation 'com.youth.banner:banner:1.4.10'

BIN
app/libs/mdsdk_1123_1.2.1.12.jar


+ 21 - 7
app/src/main/java/com/sheep/gamegroup/receiver/SheepJpushReceiver.java

@@ -15,6 +15,7 @@ import android.util.Log;
 
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.view.activity.MiddleAct;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 
 import org.json.JSONException;
@@ -25,8 +26,6 @@ import java.util.Random;
 
 import cn.jpush.android.api.JPushInterface;
 
-import static android.content.Context.NOTIFICATION_SERVICE;
-
 /**
  * Created by realicing on 2018/5/9.
  * realicing@sina.com
@@ -163,16 +162,31 @@ public class SheepJpushReceiver extends BroadcastReceiver {
     //                .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.icon))
     //                .setSmallIcon(R.mipmap.remenyx)//系统状态栏显示的小图标 remenyx
                     .setSmallIcon(R.drawable.icon)
+                    .setTicker(title)
+                    .setDefaults(Notification.DEFAULT_VIBRATE)
                     .setWhen(System.currentTimeMillis())
                     .setTicker(title)//Ticker是状态栏显示的提示
                     .setDefaults(NotificationCompat.DEFAULT_ALL);
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-                notificationBuilder.setContentTitle(appName)//第一行内容  通常作为通知栏标题
+                notificationBuilder.setContentTitle(title)//第一行内容  通常作为通知栏标题
                         .setOngoing(true)//禁止滑动删除
-                        .setContentText(title);//第二行内容 通常是通知正文
-                NotificationChannel mChannel = new NotificationChannel(String.valueOf(msgId), appName, NotificationManager.IMPORTANCE_HIGH);
-                mNotificationManager.createNotificationChannel(mChannel);
-            } else {
+                        .setContentText(msg);//第二行内容 通常是通知正文
+                NotificationChannel channel = new NotificationChannel(String.valueOf(msgId), appName, NotificationManager.IMPORTANCE_HIGH);
+                channel.canBypassDnd();//是否可以绕过请勿打扰模式
+                channel.canShowBadge();//是否可以显示icon角标
+                channel.enableLights(true);//是否显示通知闪灯
+                channel.enableVibration(true);//收到小时时震动提示
+                channel.setBypassDnd(true);//设置绕过免打扰
+                channel.setLockscreenVisibility(NotificationCompat.VISIBILITY_SECRET);
+                channel.setLightColor(context.getColor(R.color.theme_app_main));//设置闪光灯颜色
+                channel.getAudioAttributes();//获取设置铃声设置
+                channel.setVibrationPattern(new long[]{100, 200, 100});//设置震动模式
+                channel.shouldShowLights();//是否会闪光
+                mNotificationManager.createNotificationChannel(channel);
+            } else if(BuildConfig.DEBUG) {
+                notificationBuilder.setContentTitle(title)//第一行内容  通常作为通知栏标题
+                        .setContentText(msg);//第二行内容 通常是通知正文
+            } else {//下面部分为测试部分
                 notificationBuilder.setContentTitle(appName)//第一行内容  通常作为通知栏标题
                         .setContentText(title);//第二行内容 通常是通知正文
                 if (!TextUtils.isEmpty(msg)) {

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -30,7 +30,6 @@ import com.alipay.sdk.app.PayTask;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.mdad.sdk.mdsdk.AdManager;
 import com.mdad.sdk.mdsdk.common.AdData;
-import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.IJump;
 import com.sheep.gamegroup.absBase.IJumpWeb;

+ 0 - 9
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogMidong.java

@@ -13,23 +13,14 @@ import android.widget.TextView;
 import com.bumptech.glide.Glide;
 import com.mdad.sdk.mdsdk.AdManager;
 import com.mdad.sdk.mdsdk.common.AdData;
-import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
-
-import org.afinal.simplecache.ACache;
 
 import java.util.Locale;
 
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_DIALOG_COPY_CODE;
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_DIALOG_START_APP;
-
 /**
  * Created by ljy on 2018/9/17.
  */

+ 9 - 0
app/src/main/res/drawable/selector_button_orange.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+  <item android:state_enabled="false" android:drawable="@drawable/button_full_normal_gray" />
+  <item android:state_focused="true" android:drawable="@drawable/sp_bg_rectangle_orange_10_click" />
+  <item android:state_checked="true" android:drawable="@drawable/sp_bg_rectangle_orange_10_click"/>
+  <item android:state_selected="true" android:drawable="@drawable/sp_bg_rectangle_orange_10_click"/>
+  <item android:state_pressed="true" android:drawable="@drawable/sp_bg_rectangle_orange_10_click"/>
+  <item android:drawable="@drawable/sp_bg_rectangle_orange_10"/>
+</selector>

+ 9 - 0
app/src/main/res/drawable/sp_bg_rectangle_orange_10_click.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <solid android:color="#88FF6600"/>
+    <corners
+        android:radius="10dp"/>
+
+</shape>

+ 1 - 1
app/src/main/res/layout/x_ask_getmoney_act_layout.xml

@@ -194,7 +194,7 @@
                 android:layout_alignParentTop="true"
                 android:layout_centerHorizontal="true"
                 android:layout_marginTop="30dp"
-                android:background="@drawable/sp_bg_rectangle_orange_10"
+                android:background="@drawable/selector_button_orange"
                 android:gravity="center"
                 android:paddingEnd="12dp"
                 android:paddingStart="12dp"