Android Studio

if (window.localStorage.getItem("installed") == undefined) {
   /* run function */
   window.localStorage.setItem("installed", true);
}
Important Iguana