For our iOS application, we have the ability for the user to enter in simple key-value preferences that should persist in 6 other applications within the same app group. This means the user will not need to re-enter those preferences 6 more times each time they open the other applications. We do this simply by calling UserDefaults(suiteName:) which returns a dictionary that is collectively readable/writable in all 7 iOS applications, which is quite convenient and useful. Is there an Android java equivalent of this? We don't want all of our Android users being forced to enter in the same information 7 times. I have tried creating a file that would be world readable/writable but cannot seem to find an appropriate directory that can be accessed by all 7 applications.
iOS UserDefaults Sharing Preferences Across Multiple Applications Android Equivalent
187 Views Asked by rolling_codes At
1
I had to write a hack to achieve this functionality, which was not preferred, but the requirement was necessary. I followed some of the accepted answer in this thread as suggested by Morrison Chang, but ended up having to loop through and compare to see which preference file was updated most recently and then make the updates to the app running the code, accordingly.