How can i save a value like an int or bool and then load it in an other script?
@EwoudvdWerf here is it some link that can help you
i'm not an expert but imagine this scenario
you have two activity
on the main activity on button click type this
string str ="my text will be appear on second screen";
var secondActivity= new Intent(context, typeof(NameOfYourSecondActivity));
now on second activity onCreate for exemple type this
string text = Intent.GetStringExtra("TextToSave") ?? "Data not available";
next step is to assign variable text to a control and you can pass some other type like json, int, bool and so on ...
hope this help
@ChristopheBERNARD no, i need to save a int and load it up when the app starts up
@EwoudvdWerf could you provide more information please ?
perhpas save this value in the text file and when the app start load the value
@ChristopheBERNARD Yes that sounds great idea, but could you tell me how to write and load something on a .txt file?
@ChristopheBERNARD thanks, it works perfectly!
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies