private void loadVideo()
{
ContentResolver contentResolver = getContentResolver();
Uri uri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
String selection = MediaStore.Video.VideoColumns.DATA + "=?";
String sortOrder = MediaStore.Video.Media.TITLE + " ASC";
Cursor cursor = contentResolver.query(uri, null, selection, null, sortOrder);
if (cursor != null && cursor.getCount() > 0) {
videoList = new ArrayList<>();
while (cursor.moveToNext()) {
String data = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.DATA));
String title = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.TITLE));
videoList.add(new vedio21(data, title));
Log.d("VideoList",data.toString());
}
}
cursor.close();}
Search This Blog
Popular Posts
-
package com.example.mediaplayer; import androidx.annotation. NonNull ; import androidx.annotation. Nullable ; import androidx.annotation. Re...
-
<? xml version ="1.0" encoding ="utf-8" ?> < manifest xmlns: android ="http://schemas.android.com/apk/re...
-
package com.example.progressbar; import android.annotation. SuppressLint ; import android.content.Context; import android.graphics.Canvas;...
-
بيئة تطوير أندرويد جافا xml تعلم دروسًا مجانية في برمجة تطبيقات Android سنقدم كل شيء مهم لبرمجة تطبيقات Android تابعنا واشترك معنا اند...
-
package com.example.andplayerbass.open_by_file; import android.animation.TimeAnimator; import android.annotation. SuppressLint ; import andr...
-
import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.Service; import android.content.Context; ...
-
private void loadVideo() { ContentResolver contentResolver = getContentResolver(); Uri uri = MediaStore.Video.Media. EXTERNAL_CONTEN...
-
1 إطلاق المشروع تعريف الاهداف مثال البرنامج يخدم الطلاب أو المدرسين من ناحيه كذا او كذا او يخدم البنوك وضع خطه شام له للمشروع البر...
Sunday, October 25, 2020
MediaStore.Video.Media.EXTERNAL_CONTENT_URI
Subscribe to:
Post Comments (Atom)
Android Studio Java xml Learn free lessons in programming Android applications We will offer everything important for programming Android applications Follow us and subscribe with us
بيئة تطوير أندرويد جافا xml تعلم دروسًا مجانية في برمجة تطبيقات Android سنقدم كل شيء مهم لبرمجة تطبيقات Android تابعنا واشترك معنا اند...
-
package com.example.andplayerbass.open_by_file; import android.animation.TimeAnimator; import android.annotation. SuppressLint ; import andr...
-
import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.Service; import android.content.Context; ...
-
package com.example.mediaplayer; import androidx.annotation. NonNull ; import androidx.annotation. Nullable ; import androidx.annotation. Re...
No comments:
Post a Comment