code re-factor, added method to Tracker to get root activity

code re-factor, added method to Tracker to get root activity