SecurityException with grantUriPermission when sharing a file with FileProvider

后端 未结 2 771
甜味超标
甜味超标 2020-12-03 07:56

I have two applications. I\'m trying to share a file from application A to application B using a FileProvider. Application A calls the insert method on a ContentProvider i

2条回答
  •  余生分开走
    2020-12-03 08:25

    The first problem in your code is exported attribute set to false. Please change it to true as,

    
    
    

    The second thing you have to do is, If external application App B is using content provider in App A.Then in App A manifest file mention permission as,

    
    
    
    
    

    and in App B mention uses-permission as,

    
    
    

    Please let me know whether your problem has solved or not. If not please send your entire code. I will try to find the problem. Thank you.

提交回复
热议问题