Implemented a conditional check to support providing the duration limit for the Android platform SDK 8 and above. The value is passed using the string literal value to ensure the logic is not dependent on SDK version specifics.

This commit is contained in:
Richard Burton
2013-03-14 12:21:59 -07:00
committed by Braden Shepherdson
parent 9fa6cea69b
commit 1648f161d9
@@ -219,7 +219,7 @@ public class Capture extends CordovaPlugin {
Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
if(Build.VERSION.SDK_INT > 8){
intent.putExtra(android.provider.MediaStore.EXTRA_DURATION_LIMIT, duration);
intent.putExtra("android.intent.extra.durationLimit", duration);
}
this.cordova.startActivityForResult((CordovaPlugin) this, intent, CAPTURE_VIDEO);
}