+ else if (intent.getAction().equals(NEW_VIDEO_ACTION)) {
+ if (!isConnectedViaWiFi(context)) {
+ Log_OC.e(TAG, "No Wifi available .. Video instant upload only possible if WiFi is on");
+ return;
+ }
+ String[] CONTENT_PROJECTION = { Video.Media.DATA, Video.Media.DISPLAY_NAME, Video.Media.MIME_TYPE, Video.Media.SIZE };
+ c = context.getContentResolver().query(intent.getData(), CONTENT_PROJECTION, null, null, null);
+ if (!c.moveToFirst()) {
+ Log_OC.e(TAG, "Couldn't resolve given uri: " + intent.getDataString());
+ return;
+ }
+ file_path = c.getString(c.getColumnIndex(Video.Media.DATA));
+ file_name = c.getString(c.getColumnIndex(Video.Media.DISPLAY_NAME));
+ mime_type = c.getString(c.getColumnIndex(Video.Media.MIME_TYPE));
+ Log_OC.w(TAG, "New video received");
+ }
+ c.close();
+ Log_OC.d(TAG, file_path + "");