2016-06-21 5 views

Antwort

3

Bitte beachten MX-Player-API-Link zu spielen.

https://sites.google.com/site/mxvpen/api

/** Open another app. 
* @param context current Context, like Activity, App, or Service 
* @param packageName the full package name of the app to open 
* @return true if likely successful, false if unsuccessful 
*/ 
public static boolean openApp(Context context, String packageName) { 
    PackageManager manager = context.getPackageManager(); 
    try { 
     Intent i = manager.getLaunchIntentForPackage(packageName); 
     if (i == null) { 
      return false; 
      //throw new PackageManager.NameNotFoundException(); 
     } 
     i.addCategory(Intent.CATEGORY_LAUNCHER); 
     context.startActivity(i); 
     return true; 
    } catch (PackageManager.NameNotFoundException e) { 
     return false; 
    } 
} 

openApp(this, "com.mxtech.videoplayer.pro"); // Pro version of MX player 
openApp(this, "com.mxtech.videoplayer.ad"); // free version of MX player 
+0

_thanks_.its Arbeits –