edited script getAppActivityName to get the right info