here is my code to call mxplayer but it didn't work, why ?
Intent myIntent ;
PackageManager manager = getPackageManager();
myIntent = manager.getLaunchIntentForPackage("com.mxtech.videoplayer.ad");
startActivity(myIntent);
here is my code to call mxplayer but it didn't work, why ?
Intent myIntent ;
PackageManager manager = getPackageManager();
myIntent = manager.getLaunchIntentForPackage("com.mxtech.videoplayer.ad");
startActivity(myIntent);
The official explanation is to say, What is your program if there is an error message? Return a "good" intent to launch a front-door activity in a package, for use for example to implement an "open" button when browsing through packages.
The developer of MX Player documented its package namespaces here: https://sites.google.com/site/mxvpen/api
So if you have installed the pro version, you need to use another name.
Further more you can catch the exception for the case, that the MX Player isn't installed on the system: