How to know whether android shortcut already exist
ex.
public void createShortcut(String url,String shortcutName, String type, Bitmap img)
{
Intent shortcutIntent = new Intent();
shortcutIntent.setAction(Intent.ACTION_VIEW);
if(type.equalsIgnoreCase("web")) {
Uri uri = Uri.parse(url);
shortcutIntent.setData(uri);
}
else if (type.equalsIgnoreCase("app")) {
Log.d("DEBUGGING", "Inside app installation " + url + " : " + group + " : " + shortcutName);
shortcutIntent.setClassName(url,group);
}
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Intent addIntent = new Intent();
addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, shortcutName);
addIntent.putExtra("duplicate", false);
addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, scaledBitmap);
// addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, R.drawable.ic_launcher);
addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
sendBroadcast(addIntent);
// Toast mToast = Toast.makeText(this, "shortcut created", Toast.LENGTH_SHORT);
// mToast.show();
}
Showing posts with label How to know. Show all posts
Showing posts with label How to know. Show all posts
How to know my computer configuration in windows xp
Just do the following steps to know your computer configuration in windows xp
Goto Start > Run... > type dxdiag > Press OK
There will be different tabs such as follows:
Just Click on the preferable tab to view the desired configuration.
You can view System, Display, Sound, Music etc.
Subscribe to:
Posts (Atom)