The audio file not playing intent is providing null, no music apps found,while some other apps capable to do this by playing it with different music app.But here in my case it goes to the else part.
This is not working on android PIE haven't tested with older versions.
We have tried many solutions like Android launching music player using intent but its not working maybe android has updated the music play usage.
Intent movieIntent = new Intent();
movieIntent.setPackage("com.google.android.music");
movieIntent.setAction(Intent.ACTION_VIEW);
movieIntent.setDataAndType(Uri.parse(vFilePath),"audio/*");
//Play Music With Installed Apps
if(movieIntent.resolveActivityInfo( context.getPackageManager(),0)!=null){
context.startActivity(movieIntent);
}
else{
//
}
None of the old solutions are working I am looking for an updated solution.