Actually, android needs to do it before modifying storage and iOS needs to do it after clearing the timeout so it can't be done outside.