I found one way to do this.
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(YOUR_SONG_PATH), "audio/*");
startActivity(intent);
More Related Contents:
- How to close/hide the Android soft keyboard programmatically?
- How to handle a lost KeyStore password in Android?
- How to add SHA-1 to android application
- Android LinearLayout : Add border with shadow around a LinearLayout
- How to redirect my log output from logcat to the SD-Card on an android device?
- Android Overriding onBackPressed()
- How to set Internet options for Android emulator?
- Android hide/unhide app icon programmatically
- Generate Apk file from aab file (android app bundle)
- Overlapping Views in Android
- Google Play Game Services – unable to sign in
- Does Android keep the .apk files? if so where?
- How to set TextInputLayout error message colour?
- Android runOnUiThread explanation
- The process of the service is killed after the application is removed from the application tray
- What do GC_FOR_MALLOC, GC_EXPLICIT, and other GC_* mean in Android Logcat?
- Android Dashboard Pattern
- Android LocationManager.getLastKnownLocation() returns null
- Disable home button in android toddler app?
- Force a camera to always open in portrait mode in android [duplicate]
- Android checkbox style
- Failed to find style ‘mapViewStyle’ in current theme
- Change Checkbox value without triggering onCheckChanged
- How to add a button at the end of RecyclerView?
- Scoping States in Jetpack Compose
- Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0)
- Comparing two locations using their Longitude and Latitude
- How to keep Bluetooth connection background?
- how to pause and resume a surfaceView thread
- Android: Simulate WiFi in the emulator?