Fixed errors with Capture Activity

converted switch statements to if-else statements and updated sdk
versions