android - Open image from sdcard -


I want to open the saved image on sdcard and the user should choose under that application from which they want to open the image Are there. How can I do this? Thanks to the option given below to the Internet with the option below which I do not want

  startActivity (new intent (Intent.ACTION_VIEW, Uri.parse ("file: / //sdcard/myapp/2014-04-21.png")));    

You need to specify the data type. Try it instead:

  intent = new intent (); Intent.setAction (Intent.ACTION_VIEW); intent.setDataAndType (Uri.parse ("file: ///sdcard/myapp/2014-04-21.png"), "image / *"); StartActivity;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -