Created
February 29, 2016 12:49
-
-
Save codenameone/fc7693ef69108e90057c to your computer and use it in GitHub Desktop.
Sample code for the Codename One Preferences API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// save a token to storage | |
Preferences.set("token", myToken); | |
// get the token from storage or null if it isn't there | |
String token = Preferences.get("token", null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage of the Preferences class.
From the Codename One project