The format is:
"android.resource://[package]/[res id]"
[package] is your package name
[res id] is value of the resource ID, e.g. R.drawable.sample_1
to stitch it together, use
Uri path = Uri.parse("android.resource://your.package.name/" + R.drawable.sample_1);
More Related Contents:
- Get real path from URI, Android KitKat new storage access framework [duplicate]
- Get filename and path from URI from mediastore
- Getting the Absolute File Path from Content URI for searched images
- How to implement my very own URI scheme on Android
- How to get Bitmap from an Uri?
- How to get the Full file path from URI
- How to use “Share image using” sharing Intent to share images in android?
- How to get URI from an asset File?
- Convert file: Uri to File in Android
- Android: Getting a file URI from a content URI?
- Android 2.2 MediaPlayer is working fine with one SHOUTcast URL but not with the other one
- Get Real Path For Uri Android
- Use URI builder in Android or create URL with variables
- Custom URI Schemes for the Facebook Messenger
- Displaying images from a specific folder on the SDCard using a gridview
- Android- how can I convert android.net.Uri object to java.net.URI object?
- Android: Get thumbnail of image on SD card, given Uri of original image
- Image Uri to bytesarray
- How to listen for a custom URI
- How to get uri of captured photo?
- FileProvider throws exception on GetUriForFile
- Unreachable statement for if statement [closed]
- How to set mobile system time and date in android?
- select a word on a tap in TextView/EditText
- How do I use tools:overrideLibrary in a build.gradle file?
- How do I repeat a method every 10 minutes after a button press and end it on another button press
- Is there a way to use the SpeechRecognizer API directly for speech input?
- Calling hidden API in android to turn screen off
- Cloud Firestore: FAILED_PRECONDITION: The query requires an index
- Get Last Call Duration in android