activity state binary serialization