GET_ACCOUNTS permission while using GCM - Why is this needed?

前端 未结 6 1900
小鲜肉
小鲜肉 2020-12-07 20:50

I have an app, with Push notifications implemented.

I want to understand the reason why we need \"GET_ACCOUNTS\"(android.permission.GET_ACCOUNTS), while implementing

6条回答
  •  -上瘾入骨i
    2020-12-07 21:09

    As everyone else here has said, GET_ACCOUNT is needed for android devices lower than 4.0.4.

    If you are like me and have installed a library that automatically adds this permission but you do not need it to, you can tell the AndroidManifest to remove the permission by adding the permission to with the tools:node="remove" attribute like so:

    In your AndroidManifest.xml file, make sure the xmlns:tools attribute it defined in your manifest tag and then add the permission with remove set:

    
    
      ...
    
      
    
      ...
    
    
    

    Word or warning that this never actually works for me but I know it has worked for others. If you can see what I might be doing wrong or have any more info about it, please comment!

    *Edit: There is a bug report open to get this feature working: https://bugzilla.xamarin.com/show_bug.cgi?id=48153

提交回复
热议问题