Lower MinSDK to 7 on sample project
cleaned up if statement and changed try/catch to instanceof