damnwabbit
damnwabbit

Reputation: 1

opening sdcard gallery album directory

Hi I am making the button which opens gallery(Default)album in sd card putting following funtion to the button But i don't understand why this funtion makes whole application stops...

public void goTopAlbum(View v){
         Toast.makeText(MainActivity.this, "Let's open gallery!", Toast.LENGTH_SHORT).show();
         Intent mIntent = new Intent(getIntent().ACTION_VIEW, Uri.parse("file:///sdcard/image/Album1"));
         //dataType name = new dataType
         startActivity(mIntent);
     }

Upvotes: 0

Views: 32

Answers (1)

greenapps
greenapps

Reputation: 11214

  getIntent().ACTION_VIEW

Change to

  Intent.ACTION_VIEW

Upvotes: 1

Related Questions