Search code examples
androidshortcutlauncherreceiver

How to receive INSTALL_SHORTCUT broadcast on Android


I try to receive an event everytime a new shortcut on the Homescreen/Luncher was created. After my app receive the event I like to modify the shortcut. My current configuration is listed below, but I never receive an event.

<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />    
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
<application>
  <receiver  
     android:name=".InstallShortcutReceiver"
     android:permission="com.android.launcher.permission.INSTALL_SHORTCUT">
    <intent-filter>
      <action android:name="com.android.launcher.action.INSTALL_SHORTCUT" />
    </intent-filter>
  </receiver>
</application>

Is my idea possible ?

Best Regards, André


Solution

  • I found it. When I shortcut is created using drap and drop from the menu no INSTALL_SHORTCUT event is published.