Crowdsensing in Urban areas for city-scale mass gathering management: Geofencing and activity recognition