如果使用异步存储,React Native 应用程序是否需要在 Android 上的读/写权限? [英] Does a React Native app need read/write permission on Android if using asyncstorage?

查看:40
本文介绍了如果使用异步存储,React Native 应用程序是否需要在 Android 上的读/写权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 expo.io 的 React Native 应用程序.将来我想包括选项,以便在将使用 asyncstorage 的应用程序中保存设置.因此,我在 Android 应用程序上留下了权限,说读取 USB 存储的内容并修改或删除 USB 存储的内容".如果我删除这些权限,异步存储是否仍然有效?如果是这样,异步存储将保存在哪里?

I have a React Native app that uses expo.io. In the future I want to include options so save settings in the app which will use asyncstorage. Because of this I left permissions on the Android app saying "read the contents of your usb storage and modify or delete the contents of your usb storage". If I remove those permissions will asyncstorage storage still work? If so where will asyncstorage storage save?

推荐答案

是的,asyncstorage 无需任何许可即可工作.这就像手机的本地存储.正如文档中所述,

Yes, asyncstorage works without any permission. It is like localstorage for the phones. As state in the docs,

对于 ios =>

在 iOS 上,AsyncStorage 由本机代码支持,该代码将小值存储在序列化字典中,并将较大值存储在单独的文件中

On iOS, AsyncStorage is backed by native code that stores small values in a serialized dictionary and larger values in separate files

对于安卓 =>

在 Android 上,AsyncStorage 将根据可用内容使用 RocksDB 或 SQLite.

On Android, AsyncStorage will use either RocksDB or SQLite based on what is available.

作为参考,您可以查看 https://facebook.github.io/react-native/docs/asyncstorage.html.如果您有任何进一步的疑问,请告诉我,以便我可以帮助您:)

For reference you can check https://facebook.github.io/react-native/docs/asyncstorage.html. If you have any further queries please let me know so that i can help you out :)

这篇关于如果使用异步存储,React Native 应用程序是否需要在 Android 上的读/写权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆