Launcher shortcuts

Launcher shortcuts

8928b5277aa7234dbca4ff782952343a?s=128

funnelbit

April 26, 2016
Tweet

Transcript

  1. 8.

    4IPSUDVU*OGP Intent intent = new Intent(this, MainActivity.class);
 intent.putExtra(EXTRA_ITEM, "itemͩͧ");
 


    return new ShortcutInfo.Builder(this)
 .setId("first")
 .setTitle("͜Μʹͪ͸")
 .setText("Αͬ͠Ό͍ͧ͘")
 .setWeight(3)
 .setIcon(Icon.createWithResource(this, R.mipmap.ic_launcher))
 .setIntent(intent)
 .build();
  2. 12.

    -BVODIFS"QQTHFU4IPSUDPVU*OGP List<String> ids = new ArrayList<>();
 ids.add("first");
 
 List<ShortcutInfo> shortcuts

    = mLauncherApps.getShortcutInfo( "com.experopero.launchershortcutsapplication", ids, userHandle ); 
 for (ShortcutInfo shortcutInfo : shortcuts) {
 Log.e("title", shortcutInfo.getTitle());
 }