How to implement a ContentProvider for providing image to Gmail, Facebook, Evernote, etc

前端 未结 3 1229
南方客
南方客 2021-01-05 11:00

My previous question (Is it possible to share an image on Android via a data URL?) is related to this question. I have figured out how to share an image from my application

3条回答
  •  旧时难觅i
    2021-01-05 11:56

    I'm not familiar with the permissions I am or am not requiring or how to disable them

    Try replacing:

    
        
    
    

    with:

    
    
    

    You really should have android:exported="true" in the first one too, but the permissions change I was referring to represents the removal of android:readPermission and >.

    Then, get rid of addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); in your Java code.

    This sets up your ContentProvider to be world-readable. Long-term, that might not be the right answer. Short-term, it will help to determine if your Android 2.2.2 problem is because FLAG_GRANT_READ_URI_PERMISSION is not being honored.

提交回复
热议问题