0

I looked this Unknown file type MIME? but it doesn't help.

I tried to use application/octet-stream as mime type but it throws exception

    android.content.ActivityNotFoundException: No Activity found to handle Intent { 
act=android.intent.action.VIEW

if I do change the mimetype like image/jpg it work just fine. I know that it is strange but is some Samsung Galaxy issue. On HTC Desire it works perfectly.

Do you have any idea how can I pass mime type to Intent of 'any' type ?

Community
  • 1
  • 1
Lukap
  • 31,523
  • 64
  • 157
  • 244
  • try `binary/octet-stream` instead and see if that works. – Brad Christie May 31 '11 at 13:30
  • intent.setDataAndType(Uri.fromFile(file), 'binary/octet-stream'); That is the way I call it but I doesn't work on galaxy . . . – Lukap May 31 '11 at 14:28
  • Galaxy may block certain mime types (I know my Samsung Galaxy S did until I downloaded a file browser app to allow it--e.g. I couldn't download and store, say, an .apk from a website until I had a specific app installed). – Brad Christie May 31 '11 at 14:31
  • It is a bit frustrating, and the biggest problem is I don't if it is possible to do some workaround to this problem at all. But to look on the bright side on HTC works great :-) – Lukap May 31 '11 at 14:40
  • May be worthwhile checking out the [android stackexchange](http://android.stackexchange.com/) and asking around if the problem does exist (or at least confirm). – Brad Christie May 31 '11 at 14:47
  • So as a general conclusion :), be very careful with mimetypes and galaxy it might appear weird problems... , I do not know how to close this Threa , I guess someone need to comment first . . . – Lukap May 31 '11 at 21:42

1 Answers1

0

With mime types it was very confusing on my galaxy, but I done two things I do not know what fix my problem.

first I make factory data reset on the phone second I used "/" for mime type

I do not know what fix my problem but after the reset the exception it is not thrown any more, I guess that was the fix :-)

Lukap
  • 31,523
  • 64
  • 157
  • 244