I need to get app data from native code which is stored by asyncstorage in react native. So there is any way to get asyncstorage data from native code?
I need to get app data from native code which is stored by asyncstorage in react native. So there is any way to get asyncstorage data from native code?
You can perform reading operations on android with two classes: AsyncLocalStorageUtil and ReactDatabaseSupplier;
import com.reactnativecommunity.asyncstorage.AsyncLocalStorageUtil;
import com.reactnativecommunity.asyncstorage.ReactDatabaseSupplier;
String value = null;
SQLiteDatabase readableDatabase = ReactDatabaseSupplier.getInstance(context).getReadableDatabase();
try {
id = AsyncLocalStorageUtil.getItemImpl(readableDatabase, "key");
} catch (JSONException | NullPointerException ignored) {}
readableDatabase.close();