Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.24 KB | None | 0 0
  1.  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
  2.         {
  3.             if (requestCode != INPUT_FILE_REQUEST_CODE || mFilePathCallback == null)
  4.             {
  5.                 super.onActivityResult(requestCode, resultCode, data);
  6.                 return;
  7.             }
  8.  
  9.             Uri[] results = null;
  10.             if (resultCode == RESULT_OK && requestCode == INPUT_FILE_REQUEST_CODE)
  11.             {
  12.                 if (data == null)
  13.                 {
  14.                     Log.e(TAG, "DEZE ?!");
  15.                     if (mCameraPhotoPath != null)
  16.                     {
  17.                         results = new Uri[]{Uri.parse(mCameraPhotoPath)};
  18.                     }
  19.                 }
  20.                 else
  21.                 {
  22.                     Log.e(TAG, "DEZE 6");
  23.                     String dataString = data.getDataString();
  24.  
  25.                     Log.e(TAG, ""+data.toString());
  26.  
  27.                     if (dataString != null)
  28.                     {
  29.                         Log.e(TAG, "DEZE 7");
  30.                         results = new Uri[]{Uri.parse(dataString)};
  31.                     }
  32.                 }
  33.  
  34.             }
  35.  
  36.             mFilePathCallback.onReceiveValue(results);
  37.             mFilePathCallback = null;
  38.  
  39.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement