Another app added to my launcher home page a shortcut to a specific feature in it. I want my app to launch directly this feature too. When I click the shortcut in my launcher it writes in the logcat:
{act=com.xiaomi.smarthome.scene.smarthomelauncher flg=0x10000000 cmp=com.xiaomi.smarthome/.scene.SmartHomeLauncherActivity bnds=[511,1390][700,1599] (has extras)}
what I have tried and didn't work:
PackageManager manager = context.getPackageManager();
Intent intent = manager.getLaunchIntentForPackage("com.xiaomi.smarthome");
intent.addCategory(Intent.CATEGORY_LAUNCHER);
Bundle bundle = new Bundle();
bundle.putString("act" , "com.xiaomi.smarthome.scene.smarthomelauncher");
bundle.putString("flg" , "0x10000000");
bundle.putString("cmp" , "com.xiaomi.smarthome/.scene.SmartHomeLauncherActivity");
bundle.putString("bnds" , "[322,1390][511,1599]");
intent.putExtras(bundle);
context.startActivity(intent);
any idea?
User contributions licensed under CC BY-SA 3.0