App runs continuously without exiting

  When low memory, do not kill the application, but can only write up to 3 package names (note the format, starting from the end of the package name, each package can have a maximum of 16 characters)

  For example,

  The following packages should not be killed due to low memory: com.tianqiao.luo.launcher3, com.cyj.wifigateway, com.cyj.voicerobotsbk

  Starting from the end of the package name, each package can have a maximum of 16 characters, and it is written after the application starts.

writeFile("/sys/xfocus/debug/lowmem_app", "luo.launcher3,voicerobotsbk,wifigateway");

private void writeFile(String filePath, String data){
    try {
        File f = new File(filePath);
        FileOutputStream fos = new FileOutputStream(f);
        byte bytes[] = data.getBytes();
        fos.write(bytes);
        fos.close();
    } catch (IOException e){
        Log.d(TAG, e.toString());
    }
}

  There is another way, package names starting with com.judian can also not kill the app when the memory is low

Get device name

  The device name is the name displayed when connecting devices on the mobile end, and you can use the following attribute to obtain it on the background music host end

SystemProperties.get("persist.sys.jd.name")

  System properties can be directly obtained through Android's reflection mechanism, or obtained by calling the jdsmart-common package, as follows

String name=JdSystemProperty.getString("persist.sys.jd.name", "");

Obtain the device UUID (device ID), which is unique

  Device ID, you can use the following properties to obtain it on the background music host end, which is about the device number in this machine

String name=JdSystemProperty.getString("persist.sys.jd.dev.id", "");

Regarding silent upgrades of installation packages

Android 4.4 system

Intent intent = new Intent();
intent.setAction("android.intent.action.INSTALL_PACKAGE");
intent.putExtra("JD_INSTALL_FROM_BACKGROUND", true);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.parse("file:/sdcard/***.apk");
intent.setData(uri);
mContext.startActivity(intent);

Android 8.1 system

Intent intent = new Intent();
intent.setAction("JD.intent.action.INSTALL_PACKAGE");
intent.putExtra("APK_FILE", "/sdcard/cpuwendu.apk");
ComponentName componentName = new ComponentName("com.android.packageinstaller", "com.android.packageinstaller.JDSlienceInstallService");
intent.setComponent(componentName);
mContext.startService(intent);
adb Install test
adb shell
am start-service -a JD.intent.action.INSTALL_PACKAGE --es "APK_FILE" "/sdcard/cpuwendu.apk" com.android.packageinstaller/com.android.packageinstaller.JDSlienceInstallService

Replace the gateway module interface plug-in with attention

  If the gateway module is replaced, an action needs to be added under the CustomSmartService in the plugin manifest

action android:name="com.judian.service.CustomZigbeeService"

System attribute status acquisition settings

Persist.sys.jd.swipTop 0  //Disallow sliding down from the top of JD notification bar, 1 Allow sliding down from the top of JD notification bar
persist.sys.jd.swipR //whether enable swipe to right screen, default is 1
persist.sys.jd.swipL //whether enable swipe to left screen, default is 1
persist.sys.jd.voice.switch // 1 is on, 0 is off
persist.sys.jd.name  //Get device name
ro.product.model // Get product name
ro.judian.pid  //Get product number pid
persist.sys.jd.dev.id  //Get device ID
ro.judian.rom.version  //Get firmware version
persist.sys.jd.voice.switch //Hide key configuration and rotary UI in settings, 1 is to hide, 0 is to restore
persist.sys.jd.chan.sync //Query partition or synchronization
persist.sys.jd.channel //Query current partition
persist.sys.jd.chan1.name  //Partition 1 Name
persist.sys.jd.chan2.name  //Partition 2 Name
persist.sys.jd.voice.switch //Get gateway serial port. C7 = "/dev/ttyS2"; X8, P7, M10, S10 = "/dev/ttyS3"
persist.sys.jd.has_zigbee //support zigbee; 1: Gateway version, 0: Non-gateway version
persist.sys.jd.has_zigbee //Does the system have a setup wizard?
persist.sys.jd.rom.model //S10 is the background music version S10_BGM_0: Background Music Version
persist.sys.jd.defSnSaver   //Default screensaver class
com.judian.bmlauncher/com.judian.bmlauncher.service.LockService
persist.sys.jd.wifi.mac   //WIFI MAC address
persist.sys.jd.has_zigbee //About the QR code description for app downloads on this device
app download link, length cannot exceed 90 characters
persist.sys.jd.hasDevGrp  //Whether it supports device groups, set in the interface plugin 1 supported

results matching ""

    No results matching ""