diff --git a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/java/com/gztbyc/sandan/BootReceiver.java b/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/java/com/gztbyc/sandan/BootReceiver.java deleted file mode 100644 index 5083d74..0000000 --- a/android-offline/HBuilder-Integrate-AS/simpleDemo/src/main/java/com/gztbyc/sandan/BootReceiver.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.gztbyc.pda_wms; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; - -/** - * 开机自启:监听系统开机完成广播,自动拉起应用。 - * 说明:Android 3.1+ 要求应用至少被用户启动过一次后,BOOT_COMPLETED 才会送达。 - */ -public class BootReceiver extends BroadcastReceiver { - - private static final String ACTION_QUICKBOOT_POWERON = "android.intent.action.QUICKBOOT_POWERON"; - - @Override - public void onReceive(Context context, Intent intent) { - if (intent == null || intent.getAction() == null) { - return; - } - final String action = intent.getAction(); - if (!Intent.ACTION_BOOT_COMPLETED.equals(action) && !ACTION_QUICKBOOT_POWERON.equals(action)) { - return; - } - try { - Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName()); - if (launch != null) { - launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); - context.startActivity(launch); - } - } catch (Exception e) { - // 启动失败不阻断系统广播 - } - } -} diff --git a/config/README.md b/config/README.md index 5fc9ce5..cb2f35f 100644 --- a/config/README.md +++ b/config/README.md @@ -20,7 +20,7 @@ | `wwwSource` | App 资源目录。留空则依次尝试 `unpackage/resources//www`、`dist/build/app-plus` | | `runtimeVersion` | 离线 SDK 的 5+ Runtime 版本。`prepare.cjs` 会把 www 内 `manifest.json`/`app-config-service.js` 的 `compilerVersion` 对齐到该值,避免启动时弹「HBuilderX %s 编译 / 手机端 SDK %s」提示 | | `signing.keystore` | 签名文件路径(相对项目根),放在 `android-offline/keystore/`(该目录 git 不跟踪) | -| `signing.storePassword` / `keyAlias` / `keyPassword` | 签名密码与别名,**自己填写,不要提交** | +| `signing.storePassword` / `keyAlias` / `keyPassword` | 签名密码与别名,**自己填写,不要提交**。DCloud 下发的 keystore(PKCS12)别名固定为 `__uni__` + appid 小写,本项目即 `__uni__0b3dad3`;PKCS12 的 `storePassword` 与 `keyPassword` 必须相同 | ## appKey 务必与三者一致 diff --git a/config/android.example.json b/config/android.example.json index 60e15c1..f4d87dd 100644 --- a/config/android.example.json +++ b/config/android.example.json @@ -11,7 +11,7 @@ "signing": { "keystore": "android-offline/keystore/xxx.keystore", "storePassword": "", - "keyAlias": "", + "keyAlias": "__uni__0b3dad3", "keyPassword": "" } }