Permalink
Browse files

CB-5202 fix from lubogospod

  • Loading branch information...
1 parent 32d9b1c commit 0c7941fb61c486e1ffd13e70ec114860e4527603 @mbillau mbillau committed Jan 30, 2014
Showing with 13 additions and 3 deletions.
  1. +13 −3 src/android/Capture.java
View
@@ -346,8 +346,19 @@ public void run() {
@Override
public void run() {
- // Get the uri of the video clip
- Uri data = intent.getData();
+
+ Uri data = null;
+
+ if (intent != null){
+ // Get the uri of the video clip
+ data = intent.getData();
+ }
+
+ if( data == null){
+ File movie = new File(getTempDirectoryPath(), "Capture.avi");
+ data = Uri.fromFile(movie);
+ }
+
// create a file object from the uri
if(data == null)
{
@@ -428,7 +439,6 @@ private JSONObject createMediaFile(Uri data) {
// this will never happen
e.printStackTrace();
}
-
return obj;
}

0 comments on commit 0c7941f

Please sign in to comment.