0

I want to launch a single Intent to select images from either the Gallery or the Camera. I refer this answer in my application.

I have already tested the code and it was working perfectly fine on my device. But when I test it today, it was showing dialog box with message "No application can perform this action".

I have looked in my phone camera and gallery both working fine and enabled. Still I am having this issue in my phone.

I have also looked on the internet but not able to find any solution. Hope you guys can help me.

P.S. I am using Sony Xperia M(Android version 4.3) for testing.

Community
  • 1
  • 1
Pooja
  • 2,417
  • 20
  • 39
  • Possible duplicate of [Android - getting an error "no application can perform this action" while trying to send an email?](http://stackoverflow.com/questions/5779077/android-getting-an-error-no-application-can-perform-this-action-while-trying) – Dhaval Parmar Jan 07 '16 at 03:59
  • My question is not for sending emails. Please read the question properly. @DhawalSodhaParmar – Pooja Jan 07 '16 at 05:26
  • its not about sending email, pick image whatever... its about setType("text/plain"); in your intent. use appropriate for your intent – Dhaval Parmar Jan 07 '16 at 05:40
  • It doesn't solve entire issue. I am able to see camera now but not gallery. @DhawalSodhaParmar – Pooja Jan 07 '16 at 05:53
  • I resolved issue by setting setType("image/*"); Thanks. – Pooja Jan 07 '16 at 05:58
  • Clear the cache and clear data of camera application then try out. – Andy Developer Feb 25 '16 at 12:09

1 Answers1

1

I resolved issue by setting setType("image/*");

Dhaval Parmar
  • 18,812
  • 8
  • 82
  • 177
Pooja
  • 2,417
  • 20
  • 39
  • care to comment whoever did downvote for this answer? Because my code is perfectly working and also it is same in the code which i refer to. – Pooja Jan 26 '16 at 07:32