发起另一个包

List<ResolveInfo> info = getPackageManager().queryIntentActivities(i, 0); 
String packageName=null, className=null; 
for ( ResolveInfo r: info){ 
   
if ( r.activityInfo.packageName.startsWith("com.amazon.mp3")){ 
        packageName
=r.activityInfo.packageName; 
        className
=r.activityInfo.name; 
       
break; 
   
} 
} 
if ( packageName != null && className != null) 
    i
.setClassName(packageName, className); 
startActivity
(i); 

你可能感兴趣的:(包)