1. Download our Official Android App: Forums for Android!

Apps Loading Videos into Tab View

Discussion in 'Android Development' started by kivy, Jul 13, 2010.

  1. kivy

    kivy Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    17
    Joined:
    Jul 13, 2010

    Jul 13, 2010
    17
    0
    15
    Hi there :),

    I am very new to Android and stuck with my application.
    I am desperately looking for a way to access the phone's and SD's video gallery/directory and load the videos into my tab view, while arranging them as thumbs in some sort of grid view.

    I started to look at this here:

    Code (Text):
    1.  startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Video.Media.INTERNAL_CONTENT_URI), PICK_VIDEO);
    2.  
    3.      @Override
    4.         public void onActivityResult(int requestCode, int resultCode, Intent data) {
    5.               super.onActivityResult(requestCode, resultCode, data);
    6.               if (requestCode == PICK_VIDEO)
    7.                 if (resultCode == Activity.RESULT_OK) {
    8.                   Uri selectedVideo = data.getData();
    9.                   // TODO Do something with the select Video URI
    10.                 }
    11.         }
    but it says that it cannot resolve PICK_VIDEO, i am really stuck here and would be glad for some help..Thanks
     

    Advertisement

Share This Page

Loading...