I have the following void
protected void onPaymentSuccess(PaymentResponse response) {
// Stuff...
}
I want to save a string within a void for example
String key = "JHIJHFEIRUFHEURFGEU5";
And i want to be able to retrieve it again (this string to be saved to phone) after phone restart, closing application.
this page will show you many techniques you can use to save thing in a persistant manner so that the can be retrieved even after your application has closed / the device has been turned off etc…
Which one of the proposed ways you want to use depends on what exactly you need. You haven’t given many details about your situation so I wouldn’t know which will work best for you.