Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Launcher shortcuts

Launcher shortcuts

funnelbit

April 26, 2016
Tweet

More Decks by funnelbit

Other Decks in Technology

Transcript

  1. 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. -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());
 }