getactivity in js