I have an image file on my sdcard and the path to the file is:
/sdcard/apps/MyPath/1249487966270.png
When a user clicks a button on my application I want to display this
image to the user. Inside of the click listener I'm using the
following code:
Intent i = new Intent(Intent.ACTION_VIEW,
Uri.parse("file:///sdcard/
apps/MyPath/1249487966270.png"));
i.setType("image/png");
startActivity(i);
The button click event happens, the activity is started and then it is
ignored. Nothing appears!
Watching the log through DDMS I see the following entries:
08-05 11:59:26.320: INFO/ActivityManager(56): Starting activity:
Intent { action=android.intent.action.VIEW type=image/png comp=
{com.android.camera/com.android.camera.ViewImage} }
08-05 11:59:26.520: WARN/InputManagerService(56): Window already
focused, ignoring focus gain of:
com.android.internal.view.iinputmethodclient$stub$pr...@431d3ef8
What am I doing wrong? Why am I getting "Window already focused"? I
want to use the default activity for viewing the image (the camera's
ViewImage class). But this is not working.
Any assistance would be greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---