Sub IconaDesktop
Dim PrefMgr As PreferenceManager
If PrefMgr.GetBoolean("shortcutinstalled") Then
Return
End If
Dim shortcutIntent As Intent
shortcutIntent.Initialize("", "")
shortcutIntent.SetComponent("com.multidataitalia.siscoapp/.main") ' Put the app package name here
Dim In As Intent
In.Initialize("", "")
In.PutExtra("android.intent.extra.shortcut.INTENT", shortcutIntent)
In.PutExtra("android.intent.extra.shortcut.NAME", "SiscoApp") ' Put you're application name here
In.PutExtra("android.intent.extra.shortcut.ICON", LoadBitmap(File.DirAssets, "iconasiscoapp.jpg")) ' If you have the icon file in the assets, you just need any bitmap here. Best is 72x72 pixels because launchers do not scale. You might want to experiment a little bit with size
' Here starts the real action that all the other posts had missing:
' How to get this OUT of your app to the launcher
' You need to send a broadcast, that's all :-)
In.Action = "com.android.launcher.action.INSTALL_SHORTCUT"
Dim p As Phone
p.SendBroadcastIntent(In)
PrefMgr.SetBoolean("shortcutinstalled", True)
End Sub