I would like to read some user settings from the old (another package name) Xamarin.Android app in my new MAUI app.
In my old application, I used to save settings by calling the method
PreferenceManager.GetDefaultSharedPreferences(Application.Context)
I tried using a new context (based on old packageName) to read the old preferences file; the name of the resource that should be read is correct, but the settings list is always empty.
By the way, here the code I used to experiment:
var oldContext = context.CreatePackageContext(packageName, PackageContextFlags.IgnoreSecurity);
var settingsList = oldContext.GetSharedPreferences(oldContext.PackageName + "_preferences", FileCreationMode.Private);
Any ideas/suggestion to solve this problem?