0

I need to install a launcher icon on Home screen for my Android app. I know I can do this by sending a com.android.launcher.action.INSTALL_SHORTCUT broadcast: Add Shortcut for android application To home screen On button click

The problem is: on some Android phones, the launcher icon is automatically added on Home Screen when the app is installed, how can I detect this and avoid installing duplicate launcher icons?

Community
  • 1
  • 1
NeoWang
  • 17,361
  • 24
  • 78
  • 126

1 Answers1

1

Why do you need to detect this when it has no consequence attached to it. Just copy your launcher icon to the drawable folder and replace the original file (if any exists) and you would be fine.

Let the Android OS handle the shortcut installation.... :)

but if you are really interested, you can read this:

How to detect shortcut in Home screen

Community
  • 1
  • 1
Leye Odumuyiwa
  • 654
  • 7
  • 9