Added support for ExternalActivities

Take a look Fred - feel free to make your own modifications as you see fit.