on-internet
← Community

How to open directory in android programmatically

Stack Overflow ·

In my app I have a list of files that shows in ListActivity. Now I want to add an extra option like windows: (Open folder location) to open directory off this file. I tested some code but it does not work and throws the exception: File file=new File(path); Uri url = Uri.fromFile(file); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(url); startActivity(intent); exception: 03-08 21:14:55.451: E/AndroidRuntime(15708): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///storage/extSdCard/Bluetooth } What can I d

Comments

Sign in or sign up to comment and upvote.

No comments yet.