adds logic to make Android app go into FLASHING state