In order to Show ShutCut Menu When App Icon Long Pressed in your Sketchware project, use the codes provided below. Step 1 :- Take A Add Source Directly Block And Put The Following Code In It. android.content.pm.ShortcutManager shortcutManager = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { shortcutManager = getSystemService(android.content.pm.ShortcutManager.class); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (shortcutManager != null) { This Code Will Give Promisson For Creating ShutCut Menu. Step 2 :- Again Take A Add Source Directly Block And Put The Following Code In It. android.content.pm.ShortcutInfo shutcut1 = new android.content.pm.ShortcutInfo.Builder(MainActivity.this, " Home" ) .setShortLabel(" Home ") .setLongLabel(" Home ") .setRank( 0 ) .setIntent(new android.content.Intent(android.content.Intent.ACTION_VIEW, null, MainActivity .this, MainActivity.class)...
Texitle Is A Text Editor or Name Maker App Project Link Given Below 👇 Textile 703KB https://drive.google.com/uc?export=download&id=1rscggIAf0v9bSuH_74p9_zTlfWo3VCxV
Comments
Post a Comment