question

VolkerSchmid-3543 avatar image
1 Vote"
VolkerSchmid-3543 asked RedShanks commented

Why do some devices not support SecureStorage? And what then?

Hi,

I found that on some devices I get problems using Xamarin Essentials SecureStorage. I get errors in my software while using these constructs:

 try {
     await SecureStorage.SetAsync("someKey", "someValue");
 } catch (Exception ex) {
     // Possible that device doesn't support secure storage on device.
 }

also with this

 string value = Android.Provider.Settings.Secure.GetString(...)

I now wonder what to do if this is not working? What kind of devices is this?

I know for sure that this fails on some customers devices like Xiaomi Mi 10T Lite and Huawei P30 with Android 10 and Samsung Galaxy S21 5G with Android 11. It works fine on many other devices like my Pixel 4a (Android 11).

What can my users do to activate this? Can they do something to allow/activate this?

And what can I use instead if it fails? Is there some easy replacement as fallback?







dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

An exception may occur when using the SecureStorage api because the device may not support the function.

94862-image.png


0 Votes 0 ·
image.png (15.0 KiB)

0 Answers