Skip to content

Instantly share code, notes, and snippets.

@rajsuvariya
Last active August 6, 2017 07:26
Show Gist options
  • Save rajsuvariya/a3c37e343810f5371a548984cf7fddc0 to your computer and use it in GitHub Desktop.
Save rajsuvariya/a3c37e343810f5371a548984cf7fddc0 to your computer and use it in GitHub Desktop.
Use Native Modules in React Native + Android - Hybrid Apps
public class SharedPreferenceModule extends ReactContextBaseJavaModule {
Context mContext;
public AppSharedPreferenceManager preferenceManager;
public SharedPreferenceModule(ReactApplicationContext reactContext) {
super(reactContext);
mContext = reactContext;
preferenceManager = new AppSharedPreferenceManager(new PreferencesHelper(reactContext));
}
@Override
public String getName() {
return "SharefPreference";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment