title: android api 26+ create shortcut to app at install on home screen not working
body: <p>I'm trying to get rid of the warnings that EXTRA_SHORTCUT... is deprecated from API 26 forward.  My code seems to work but the icon isn't happening on the home page.<br></p>
  
  <pre><code>private void installShortcut(Context c) {
      Intent intent = new Intent(
          c.getApplicationContext(), c.getClass());
      intent.setAction(Intent.ACTION_MAIN);
      if (Build.VERSION.SDK_INT &gt;= 26) {
          ShortcutInfo shortcutInfo
              = new ShortcutInfo.Builder(c, "shortcutID")
                  .setShortLabel(appName)
                  .setIcon(
                     createWithResource(
                        c, R.drawable.qmark))
                  .setIntent(intent)
                  .build();
          ShortcutManager sm 
               = c.getSystemService(ShortcutManager.class);
          sm.createShortcutResultIntent(shortcutInfo);
      }
      else ...
  </code></pre>
  
  <p>I can step through the code with the debugger and everything seems to work.  I'm not seeing any warnings on log cat.  And I can't find any current answers to this question.</p>
  
  <p>Thanks
  Steve S.</p>