0 Replies Latest reply on Sep 18, 2017 10:04 PM by 長崎ちゃんぽん

    How to detect the first boot on an Android device

    長崎ちゃんぽん Level 1

      I'm searching for how to find the first boot of the application.

      At first I checked the existence of shared object like this below.




      var mySharedObj:SharedObject = SharedObject.getLocal("SO");

      if(mySharedObj.data.AAA == undefined || mySharedObj.data.AAA == null){

      trace("First Boot");

      mySharedObj.data.AAA = "test";


      trace("Not First Boot");




      This script worked within the debugging on the MS Windows.

      But once I installed it to the Android device, there appears a problem.


      In the very first installation, it detect the first boot.

      After that, I uninstall the app, and re-install the app.(i.e.the second installation)


      On the first boot of the second installation, it detect the existence of the shared object despite my expectation.

      I think this is due to the cache on the Android device.


      It seems difficult to clear cache at the point of installation / uninstallation.

      So I'd just like to know the approach to detect the FIRST BOOT, even though it is the second installation.