Get Path from another app (WhatsApp)

后端 未结 7 1184
萌比男神i
萌比男神i 2020-12-13 22:49

I\'m not getting Path from image or video from uri that I receive from whatsApp.

Uri comes like this: content://com.whatsapp.provider.media/item/16695

Media

相关标签:
7条回答
  • 2020-12-13 23:40

    You can't get a path to file from WhatsApp. They don't expose it now. The only thing you can get is InputStream:

    InputStream is = getContentResolver().openInputStream(Uri.parse("content://com.whatsapp.provider.media/item/16695"));
    

    Using is you can show a picture from WhatsApp in your app.

    0 讨论(0)
提交回复
热议问题