You can simply play a setted ringtone with this:
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);
r.play();
More Related Contents:
- How to install Google Play Services in a Genymotion VM (with no drag and drop support)?
- ‘App not Installed’ Error on Android
- How can you get the build/version number of your Android application?
- Write a file in external storage in Android
- Android Smudged layout
- UnsupportedOperationException: Can’t convert to dimension: type=0x1
- error opening trace file: No such file or directory (2)
- How to fix: “HAX is not working and emulator runs in emulation mode”
- How to set up Android emulator proxy settings
- Android Studio error “Installed Build Tools revision 31.0.0 is corrupted”
- How to compile the Android AOSP kernel and test it with the Android Emulator?
- Android emulator: could not get wglGetExtensionsStringARB error
- Visual studio (2015) emulator for android not working – XDE.exe – Exit Code 3
- The Android emulator is not starting, showing “invalid command-line parameter”
- How can I resize the AVD emulator window in Android Studio?
- Sending and receiving text using android emulator [closed]
- Android Emulator won’t run application started from eclipse
- Running emulator after building Android from source
- Proxy which requires authentication with Android Emulator
- Obtain root access via su on the Android emulator
- How can you get the build/version number of your Android application?
- INSUFFICENT_STORAGE_MEMORY message while install 50 mb apk in emulator
- Android Emulator issues in new versions – The emulator process has terminated
- Android OpenGL ES 2.0 emulator
- Does the Android emulator support OpenGL ES 3.0?
- How to access resource with dynamic name in my case?
- Android Studio Emulator: VK_VERSION_1_1 check failed
- change background color of Preference
- This app won’t run unless you update Google Play services error
- Disable multi finger touch in my app [duplicate]