Hi

I use this code to view/play different files:

Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
File file = new File(<my file>);
intent.setDataAndType(Uri.fromFile(file), <mimetype>);
startActivity(intent);

Using mp3 and "audio/*" mimetype it works OK
for jpg and "image/*" I get:


E/AndroidRuntime(  414): java.lang.RuntimeException: Unable to
instantiate activity ComponentInfo{com.android.camera/
com.android.camera.View
Image}: java.lang.IllegalAccessException: access to class not allowed
E/AndroidRuntime(  414):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2068)
...

I guess I need to know which applications are assigned to each
mimetype and how can I change their permission.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to