react native read data from async-storage in MainApplication.kt

41 views Asked by At

I want to read data from @react-native-async-storage/async-storage in MainApplication.kt's onCreate function. Is there any way to do this?

  override fun onCreate() {
    super.onCreate()
    SoLoader.init(this, false)
    if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
      // If you opted-in for the New Architecture, we load the native entry point for this app.
      load()
    }
    val isRTL = SET_FROM_ASYNC_STORAGE;
    val sharedI18nUtilInstance: I18nUtil = I18nUtil.getInstance();
    sharedI18nUtilInstance.forceRTL(this.applicationContext, isRTL);
    sharedI18nUtilInstance.allowRTL(this, isRTL);
    ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
  }
0

There are 0 answers