Hi All,
I posted this in the beginners section, but received no response.
Sorry if it is bad etiquette to re-post here, it just seems that there
is a lot more activity in this list.
I am running through the FileBrowser tutorial over @ anddev.org and
have it working fairly well, but the one thing I cannot get working is
Opening files when they are clicked on.
I always seem to get a "ActivityNotFoundException: no activity found
to handle { action: android.content.Intent.ACTION_VIEW data=file:///
sdcard/myfile.txt} "
My openFile() function looks like this:
private void openFile() {
try {
Intent myIntent = new
Intent(android.content.Intent.ACTION_VIEW, Uri.fromFile(myFile));
startActivity(myIntent);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}
Can anyone see any problems with this? Is it just that there are no
Apps registered to handle opening of .png images and .txt files? Or is
my code wrong?
Regards,
Timbobsteve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---