Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db92cb3fb |
@ -68,17 +68,8 @@ S _ 12 _ XY _ U _ Chengwai _ 10 _ 08 _ 8 _ R
|
||||
* **`Cmuh`** (中國醫客製):支援 QR Code 掃碼、處方籤醫令離線 AES 解密與解析領藥流程。
|
||||
2. **`hardware` 維度 (硬體與系統規格區隔)**:
|
||||
* **`S12XYU`**:代表 `S` (來源) + `12` (安卓號) + `XY` (主板號) + `U` (機器系列/機型規格)。
|
||||
* **`S9XYU`**:代表中國醫現場使用的 Android 9 / 21.5 吋硬體規格;除非明確指定中國醫 10 吋或 `S12XYU`,中國醫 (`Cmuh`) 相關修正與驗證預設必須使用此硬體 flavor。
|
||||
|
||||
### 4.2 Flavor 驗證與編譯指令選擇
|
||||
|
||||
針對特定客戶或現場問題修改後,必須編譯對應的 Gradle variant,不可只用通用 `assembleDebug` 或錯誤硬體 flavor 代替。
|
||||
|
||||
* **中國醫現場版 (`Cmuh`) 驗證指令**:`./gradlew :app:assembleCmuhS9XYUDebug --no-daemon`
|
||||
* **晟崴版 (`Chengwai`) 預設驗證指令**:`./gradlew :app:assembleChengwaiS12XYUDebug --no-daemon`
|
||||
* **通用版 (`General`) 預設驗證指令**:`./gradlew :app:assembleGeneralS12XYUDebug --no-daemon`
|
||||
|
||||
### 4.3 實體機台 APK 命名鐵律
|
||||
### 4.2 實體機台 APK 命名鐵律
|
||||
為了符合實體機台 OTA 平台發佈規範,打包輸出的 APK 檔名必須嚴格連動雙維度,並遵循以下格式:
|
||||
`app-[格式化硬體規格]_[專案名稱]-[版本號]-[BuildType].apk`
|
||||
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
- 禁止直接手改成品 `versionCode`/`versionName` 值。
|
||||
- 版號管理透過 `verMajor`、`verMinor`、`verPatch` 變數。
|
||||
- OTA 發版時,`versionCode` 必須嚴格遞增。
|
||||
- 中國醫現場版 (`Cmuh`) 修正預設以 `:app:assembleCmuhS9XYUDebug` 驗證。
|
||||
|
||||
## When Rules Conflict
|
||||
|
||||
|
||||
@ -9,8 +9,7 @@ plugins {
|
||||
// 避免不同尺寸機台間版本號產生衝突。
|
||||
// =========================================================================
|
||||
def verMinor = 1
|
||||
def verPatch = 67
|
||||
|
||||
def verPatch = 66
|
||||
|
||||
|
||||
android {
|
||||
|
||||
@ -138,7 +138,7 @@ public class MqttService extends Service {
|
||||
new android.os.Handler(android.os.Looper.getMainLooper()).post(() -> {
|
||||
Intent lockIntent = new Intent(getApplicationContext(),
|
||||
com.unibuy.smartdevice.ui.MaintenanceActivity.class);
|
||||
lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(lockIntent);
|
||||
});
|
||||
} else if ("unlock".equals(cmd)) {
|
||||
|
||||
@ -1,23 +1,26 @@
|
||||
package com.unibuy.smartdevice.tools;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.unibuy.smartdevice.ui.FontendActivity;
|
||||
|
||||
public class AppUtils {
|
||||
public static void resetApp(Context context) {
|
||||
Intent intent = new Intent(context, FontendActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(
|
||||
context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||
alarmManager.setExact(AlarmManager.RTC, System.currentTimeMillis() + 500, pendingIntent);
|
||||
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
}
|
||||
package com.unibuy.smartdevice.tools;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.unibuy.smartdevice.external.mqtt.MqttManager;
|
||||
import com.unibuy.smartdevice.ui.FontendActivity;
|
||||
|
||||
public class AppUtils {
|
||||
public static void resetApp(Context context) {
|
||||
Intent intent = new Intent(context, FontendActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(
|
||||
context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||
alarmManager.setExact(AlarmManager.RTC, System.currentTimeMillis() + 500, pendingIntent);
|
||||
|
||||
|
||||
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,6 @@ import androidx.fragment.app.FragmentManager;
|
||||
import com.unibuy.smartdevice.R;
|
||||
import com.unibuy.smartdevice.controller.DevController;
|
||||
import com.unibuy.smartdevice.controller.DevXinYuanController;
|
||||
import com.unibuy.smartdevice.database.SettingsDao;
|
||||
import com.unibuy.smartdevice.database.SlotsDao;
|
||||
import com.unibuy.smartdevice.databinding.ActivityFontendBinding;
|
||||
import com.unibuy.smartdevice.devices.DevNFCPay;
|
||||
@ -408,18 +407,6 @@ public class FontendActivity extends AppCompatActivityAbstract implements SaleFl
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SettingsDao settingsDao = new SettingsDao(getApplicationContext());
|
||||
if (settingsDao.isMachineLocked()) {
|
||||
settingsDao.close();
|
||||
Intent intent = new Intent(this, MaintenanceActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
settingsDao.close();
|
||||
|
||||
// 讀取最後設定語言的設定
|
||||
// LanguageHelper.applySavedLanguage(this);
|
||||
binding = ActivityFontendBinding.inflate(getLayoutInflater());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user