2 Komitmen 19ce84cea1 ... 23428b4bcf

Pembuat SHA1 Pesan Tanggal
  nisiyuan 23428b4bcf Merge remote-tracking branch 'origin/master' 1 tahun lalu
  nisiyuan 52a037be1e 修改logo图片 1 tahun lalu

+ 2 - 2
app/build.gradle

@@ -60,7 +60,7 @@ android {
             // 动态修改 常量 字段
             buildConfigField "String", "API_HOST", '"http://njmb-gk.hiseemedical.com"'
             //管控api已替换
-            buildConfigField "String", "BUGLY_APPID", '"e73b00efd7"'//已替换
+            buildConfigField "String", "BUGLY_APPID", '"ccd8eb91cb"'//已替换
             buildConfigField "String", "LOG_TAG", '"hopital_online_wdrm_dev"'//已替换
 
         }
@@ -78,7 +78,7 @@ android {
             buildConfigField "String", "API_HOST", '"https://business.tianyiyun-nj.com"'// 正式环境
             //管控api已替换
 
-            buildConfigField "String", "BUGLY_APPID", '"e73b00efd7"'//已替换
+            buildConfigField "String", "BUGLY_APPID", '"ccd8eb91cb"'//已替换
             buildConfigField "String", "LOG_TAG", '"hopital_online_wdrm_dev"'//已替换
         }
     }

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -125,6 +125,7 @@
             android:name=".ui.activity.SplashActivity"
             android:launchMode="singleTop"
             android:screenOrientation="portrait"
+            android:exported="true"
             android:theme="@style/SplashTheme">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 15 - 10
app/src/main/java/com/syjk/watch/dealer/services/ForegroundService.java

@@ -26,32 +26,32 @@ public class ForegroundService extends Service {
     //服务通信
     @Nullable
     @Override
-    public IBinder onBind(Intent intent){
+    public IBinder onBind(Intent intent) {
         //与Activity进行通信
         return null;
     }
 
     //服务创建时
     @Override
-    public void onCreate(){
+    public void onCreate() {
         super.onCreate();
         //服务创建时创建前台通知
         Notification notification = createForegroundNotification();
         //启动前台服务
-        startForeground(1,notification);
+        startForeground(1, notification);
         //有业务逻辑的代码可写在onCreate下
     }
 
     //服务销毁时
     @Override
-    public void onDestroy(){
+    public void onDestroy() {
         //在服务被销毁时,关闭前台服务
         stopForeground(true);
         super.onDestroy();
     }
 
     //创建前台通知,可写成方法体,也可单独写成一个类
-    private Notification createForegroundNotification(){
+    private Notification createForegroundNotification() {
         //前台通知的id名,任意
         String channelId = "ForegroundService";
         //前台通知的名称,任意
@@ -59,21 +59,26 @@ public class ForegroundService extends Service {
         //发送通知的等级,此处为高,根据业务情况而定
         int importance = NotificationManager.IMPORTANCE_HIGH;
         //判断Android版本,不同的Android版本请求不一样,以下代码为官方写法
-        if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){
-            NotificationChannel channel = new NotificationChannel(channelId,channelName,importance);
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+            NotificationChannel channel = new NotificationChannel(channelId, channelName, importance);
             channel.setLightColor(Color.BLUE);
 //            channel.setLockscreenVisiability(Notification.VISIBILITY_PRIVATE);
-            NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
+            NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
             notificationManager.createNotificationChannel(channel);
         }
 
         //点击通知时可进入的Activity
         Intent notificationIntent = new Intent(this, WatchMainActivity.class);
-        PendingIntent pendingIntent = PendingIntent.getActivity(this,0,notificationIntent,0);
+        PendingIntent pendingIntent;
+        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
+            pendingIntent = PendingIntent.getActivity(this, 123, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
+        } else {
+            pendingIntent = PendingIntent.getActivity(this, 123, notificationIntent, PendingIntent.FLAG_ONE_SHOT);
+        }
 
         //最终创建的通知,以下代码为官方写法
         //注释部分是可扩展的参数,根据自己的功能需求添加
-        return new NotificationCompat.Builder(this,channelId)
+        return new NotificationCompat.Builder(this, channelId)
                 .setContentTitle("Z+")
                 .setContentText("Z+正在运行")
                 .setContentIntent(pendingIntent)//点击通知进入Activity

TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/ic_launcher.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/jum_to_wx.jpeg


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/splash_head.png


+ 2 - 2
app/src/main/res/layout/activity_splash_layout.xml

@@ -5,8 +5,8 @@
     android:background="@color/white">
 
     <ImageView
-        android:layout_width="640mm"
-        android:layout_height="397mm"
+        android:layout_width="498mm"
+        android:layout_height="439mm"
         android:layout_centerHorizontal="true"
         android:layout_marginTop="380mm"
         android:background="@drawable/splash_head" />

+ 2 - 2
app/syjk/release/output-metadata.json

@@ -11,10 +11,10 @@
       "type": "SINGLE",
       "filters": [],
       "properties": [],
-      "versionCode": 202308150,
+      "versionCode": 202309010,
       "versionName": "1.0.0",
       "enabled": true,
-      "outputFile": "2023-08-15-10-06-09.apk"
+      "outputFile": "2023-09-01-15-46-19.apk"
     }
   ]
 }

+ 1 - 1
config.gradle

@@ -1,7 +1,7 @@
 ext {
     //version配置
     versions = [
-            "version-code": 202308150,
+            "version-code": 202309010,
             "watch-sdk-version": "1.0.0"
     ]
 }