Ability to define the shared preferences namespace
atticoos opened this issue · comments
Atticus White commented
Temporarily hardcoded in at https://github.com/robinpowered/react-native-android-shared-preferences/blob/develop/src/main/java/com/robinpowered/react/SharedPreferencesModule.java#L19, this should be assignable in the JS context. Currently hardcoded to prevent BC in Rooms, but will be opened up to a custom assignment.
zweihan commented
For now, I modified the code to pass it as a variable from MainActivity.java
when adding the package.
.addPackage(new SharedPreferencesPackage(this, "customPackageName")
This seems most straightforward for now. What are you planning for this feature?
Atticus White commented
We were considering two approaches -- the one you describe and the ability to do this from the JS side to allow for more than one name.