Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a React Native app need read/write permission on Android if using asyncstorage?

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?

like image 334
PurplePanda Avatar asked Sep 16 '17 19:09

PurplePanda


People also ask

How check AsyncStorage React Native?

To see what's stored in AsyncStorage with React Native, we can use the getAllKeys and multiGet methods. to call setItem with 3 key-value entries. Then we call getAllKeys to return all entries for all the keys. Next, we call multiGet with keys to return an array with the entries with the given keys .

Is AsyncStorage secure?

Is AsyncStorage secure? No AsyncStorage is not secure, the docs says: AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage system that is global to the app. It should be used instead of LocalStorage.


1 Answers

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

For ios =>

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

and for android =>

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

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 :)

like image 92
Akshay Rao Avatar answered Sep 22 '22 03:09

Akshay Rao