How i can run my app in MIUI Floating Window by some Codes

I want some way to run my application on a popup window I want some way to run my application on a popup window I mean MIUI Floating Window Using some codes in the Android Java language.



    intent.setPackage("com.miui.securitycenter");


    intent.putExtra("miui.intent.extra.PACKAGE_NAME", getPackageName());


    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);


    startActivity(intent);

} catch (Exception e) {

    SketchwareUtil.showMessage(getApplicationContext(), "There's an Error!");


    ((ClipboardManager) getSystemService(getApplicationContext().CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText("clipboard", e.toString()));

}```

But it doesn't work properly.

Upvotes: 1

Views: 38

Answers (0)

Related Questions