I am currently embedding an image ("stream") into an intent that is used to create a new shortcut using this code:
(note: I need to embed the actual file data into the intent and not a uri reference because of various project requirements)
Then when the shortcut is used to launch my app, I extract the image data using this code:
But I would also like to add a sound file (.wav) into the same intent, so how could I embed both media files/types into the same intent?
I ask because the ".SetType("image/*")" method and the "PutExtra("android.intent.extra.STREAM") method don't seem to have any type of "index" parameter to specify which "Settype" is associated with each "extra.stream". So, it gives me the impression that you can only embed one media/file in an intent.
Is there a way I can embed multiple media types and/or multiple files (of the same media type), and then how would I extract each one?
B4X:
shortcutIntent.SetType("image/*")
shortcutIntent.PutExtra("android.intent.extra.STREAM", image.bmp)
(note: I need to embed the actual file data into the intent and not a uri reference because of various project requirements)
Then when the shortcut is used to launch my app, I extract the image data using this code:
B4X:
Dim r As Reflector
r.Target = StartIntent
Dim bmp As Bitmap = r.RunMethod2("getParcelableExtra", "android.intent.extra.STREAM", "java.lang.String")
But I would also like to add a sound file (.wav) into the same intent, so how could I embed both media files/types into the same intent?
I ask because the ".SetType("image/*")" method and the "PutExtra("android.intent.extra.STREAM") method don't seem to have any type of "index" parameter to specify which "Settype" is associated with each "extra.stream". So, it gives me the impression that you can only embed one media/file in an intent.
Is there a way I can embed multiple media types and/or multiple files (of the same media type), and then how would I extract each one?