This site permanently moved to
https://droidscript.github.io
. Please update links accordingly.
You are being forwarded automatically in 3...
[stay here]
Back
SaveBoolean
Hello World
Save a boolean value to remember varibale values between multiple app starts.
app.SaveBoolean(
name
,
value
,
file
)
See also:
LoadBoolean
.
Example - Detect First Start
click to expand contents
var
file
=
"demofile"
;
function
OnStart
(
)
{
var
first
=
app
.
LoadBoolean
(
"first"
,
true
,
file
)
;
if
(
first
)
app
.
ShowPopup
(
"You ran this demo for the first time!"
)
;
else
app
.
ShowPopup
(
"This is not the first time you have run this demo."
)
;
app
.
SaveBoolean
(
"first"
,
false
,
file
)
;
}
Copy
Copy All
Run
Boolean
String
String:
path to file (
“/absolute/...”
or
“relative/...”
)
loading