I am creating a shortcut at home screen of device to open an url in browser as
public void addBookmarks(MyBookMarks bookMarks) {
Log.d(TAG, "Creating Bookmarks for " + bookMarks.getUrl());
final Intent intent = new Intent();
final Intent shortcutIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse(bookMarks.getUrl()));
long urlHash = bookMarks.getUrl().hashCode();
long uniqueId = (urlHash << 32) | shortcutIntent.hashCode();
shortcutIntent.putExtra(Browser.EXTRA_APPLICATION_ID, Long.toString(uniqueId));
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, bookMarks.getLabel());
if (bookMarks.getBookMarkIcon() != null) {
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON,
Bitmap.createScaledBitmap(bookMarks.getBookMarkIcon(), 128, 128, true));
} else {
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, "");
}
//intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bookMarks.getBookMarkIcon());
intent.putExtra("duplicate", false);
intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
//intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
this.mContext.sendBroadcast(intent);
}
Problem
When I open the shortcut it shows the url into browser, that I want to hide. How can I do this?