Firebase +权限 [英] Firebase + Permissions
问题描述
我使用消息+广告。
$ b $ pre $
compile'com.google.firebase:firebase-messaging:9.0.2'
编译com.google.firebase:firebase-ads:9.0.2
现在很多不必要的权限已经出现了
$ $ $ code $ android $ name $ android $ name $ android $ name =android.permission.READ_EXTERNAL_STORAGE
android:name =android.permission.WRITE_EXTERNAL_STORAGE
<我没有在任何地方添加这些权限,所以他们必须来自Firebase。
我知道我的客户不喜欢这些权限,所以我把它们删除了
< uses-permission
android:name =android.permission.READ_PHONE_STATE
tools:node =remove/>
< uses-permission
android:name =android.permission.READ_EXTERNAL_STORAGE
tools:node =remove/>
< uses-permission
android:name =android.permission.WRITE_EXTERNAL_STORAGE
tools:node =remove/>
我的应用程序仍然有效,消息传递和广告仍然有效,但我希望我的怀疑得到证实。
为什么Firebase会添加这些权限,并且像我一样删除这些权限真的可以?
android:name =android.permission.READ_PHONE_STATE
android:name =android.permission.READ_EXTERNAL_STORAGE
android:name =android.permission.WRITE_EXTERNAL_STORAGE
这些权限是不同的,它们不在fcm中使用。 p>
PHONE_STATE 权限了解手机的当前状态
$ b 和 READ_EXTERNAL_STORAGE strong>和 WRITE_EXTERNAL_STORAGE 可以从应用程序中添加和删除内存中的文件,如果您没有使用这些功能,则可以将其删除。
I just updated one app from Firebase 9.0.0 to Firebase 9.0.2. I use messaging + ads.
compile 'com.google.firebase:firebase-messaging:9.0.2'
compile "com.google.firebase:firebase-ads:9.0.2"
Now a lot of unwanted permission have cropped up
android:name="android.permission.READ_PHONE_STATE"
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
I didn't add those permissions anywhere, so they must be from Firebase. I know my clients don't like these permissions, so I removed them with
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:node="remove" />
My app still works, messaging and ads still work, still I'd like my suspicions confirmed.
Why does Firebase add those permissions and is it really ok to remove them like I did?
android:name="android.permission.READ_PHONE_STATE"
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
these permissions are different they are not used in fcm.
PHONE_STATE permission to know current state of phone
and READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE to add and delete file in memory from your app, if you are not using any of these functionalities you can remove it.
这篇关于Firebase +权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!