Home > Mobile >  How to save any string in MAUI app using android after app is closed?
How to save any string in MAUI app using android after app is closed?

Time:11-09

My issue is very simple and I am new using MAUI at work and I am struggling on how to store anything like a string in a MAUI android app.

I have read Microsoft docs on how to store a string in the device: enter image description here

CodePudding user response:

you need to specify the same Key value when you save and load the token

save

await SecureStorage.Default.SetAsync("MyKey", guid.ToString());

load

string oauthToken = await SecureStorage.Default.GetAsync("MyKey");
  • Related