tags:

views:

54

answers:

1

I've downloaded an APK from web, using the default browser and it can't be opened from the Browser -> Downloads.

It tells me "Can't open file"

But I can use a file browser (like OI File Browser) to browse and open this APK, and it works well.

What could be the problem here? Is it about the HTTP header?

+1  A: 

It shouldn't be HTTP headers if the file has been downloaded successfully and it's the same file that you can open from OI.

A shot in the dark, but could it be that you are not allowing installation from unknown sources, and that OI is somehow bypassing that?

Settings > Applications > Unknown sources...

David Hedlund
I've set up allowing unknown source. It looks like the Browser didn't recognize the APK as an APK. I mean, normally, an APK downloaded by browser will have an icon, but this APK doesn't have.
Johnny
@Johnny: hmm, perhaps I was too quick to rule out headers, then. What MIME type are you serving the app with? could you post the URL to it, or is it protected?
David Hedlund
@David thanks for the hint, I used JSP as a proxy for the real APK url, and in JSP I set the ContentType to application/x-download
Johnny
@Johnny: alright, try setting it to `application/vnd.android.package-archive`
David Hedlund
@Davie: Yes that works, thanks a lot!
Johnny