Security Exception got while sending image in Face

2019-06-04 19:08发布

问题:

I am developing app in which i am sharing image using intent with the use of FILEPROVIDER declared in Manifest.

I got success in sharing particular image on WhatApp, Hangout, Textra etc.. but unfortunately not success with FACEBOOK MESSENGER.

LOGCAT:

java.lang.SecurityException: Permission Denial: reading android.support.v4.content.FileProvider uri content://com.mayar.inputcontent/my_images/a1.png from pid=8677, uid=10151 requires the provider be exported, or grantUriPermission()
                                                                             at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:615)
                                                                                               at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:480)
                                                                                               at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:471)
                                                                                               at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:416)
                                                                                               at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:313)
                                                                                               at android.os.Binder.execTransact(Binder.java:453)

I am getting "Send failed. Tap to retry or delete." with red color below image in Facebook messenger.

What might be the issue ?

Thanks.