Code example for PackageManager

Methods: getLaunchIntentForPackage

0
						Toast.makeText(ProcessManager.this, display_process.get(index).processName,
								   Toast.LENGTH_SHORT).show();
						break; 
						 
					case 1: 
						Intent i = pk.getLaunchIntentForPackage(display_process.get(index).processName);
						 
						if(i != null)
							startActivity(i);
						else 
							Toast.makeText(ProcessManager.this, "Could not launch", Toast.LENGTH_SHORT).show();	
						 
						break; 
				} 
			} 
		}); 
		 
		dialog = builder.create();
		dialog.show();
	} 
Experience pair programming with AI  Get Codota for Java