List of usage examples for android.content.pm ShortcutManager reportShortcutUsed
public void reportShortcutUsed(String shortcutId)
From source file:com.android.contacts.DynamicShortcuts.java
public static void reportShortcutUsed(Context context, String lookupKey) { if (!CompatUtils.isLauncherShortcutCompatible() || lookupKey == null) return;//from www . j ava 2 s . c o m final ShortcutManager shortcutManager = (ShortcutManager) context .getSystemService(Context.SHORTCUT_SERVICE); shortcutManager.reportShortcutUsed(lookupKey); }
From source file:com.hacktx.android.activities.CheckInActivity.java
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_check_in); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); if (toolbar != null) { setSupportActionBar(toolbar);//w ww . j a v a 2 s .c o m getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle(R.string.activity_check_in_title); } if (getIntent().getBooleanExtra("fromShortcut", false) && android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { ShortcutManager shortcutManager = getSystemService(ShortcutManager.class); shortcutManager.reportShortcutUsed("check-in"); } setupStatusBar(); setupCards(); }