adding functions closeLocalytics, uploadLocalytics, resumeLocalytics