Cast Acitvity variable