Got the first half of part2 to work (check if the drive app is in the foreground).