Background Services are restricted in Xiaomi and Oppo

Finally I’ve found the answer here private static final Intent[] POWERMANAGER_INTENTS = { new Intent().setComponent(new ComponentName(“com.miui.securitycenter”, “com.miui.permcenter.autostart.AutoStartManagementActivity”)), new Intent().setComponent(new ComponentName(“com.letv.android.letvsafe”, “com.letv.android.letvsafe.AutobootManageActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.startupmgr.ui.StartupNormalAppListActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.optimize.process.ProtectActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.appcontrol.activity.StartupAppControlActivity”)), new Intent().setComponent(new ComponentName(“com.coloros.safecenter”, “com.coloros.safecenter.permission.startup.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.coloros.safecenter”, “com.coloros.safecenter.startupapp.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.oppo.safe”, “com.oppo.safe.permission.startup.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.iqoo.secure”, “com.iqoo.secure.ui.phoneoptimize.AddWhiteListActivity”)), new Intent().setComponent(new ComponentName(“com.iqoo.secure”, “com.iqoo.secure.ui.phoneoptimize.BgStartUpManager”)), new Intent().setComponent(new … Read more

How to test the `Mosquitto` server?

In separate terminal windows do the following: Start the broker: mosquitto Start the command line subscriber: mosquitto_sub -v -t ‘test/topic’ Publish test message with the command line publisher: mosquitto_pub -t ‘test/topic’ -m ‘helloWorld’ As well as seeing both the subscriber and publisher connection messages in the broker terminal the following should be printed in the … Read more