Upload a photo of the library with the Android web browser

How is it disabled on Android, is it possible to download a photo from the library in the browser? JavaScript / API photo / photo library?

thanks

+4
source share
2 answers

The webkit browser version 2.2 (Froyo) supports downloading files using the usual mechanism of the HTML form:

+4
source

I'm not sure if there is a place where you want to upload photos, but I just wrote an application that does this. It downloads Flickr and works with Android 1.6. Take a look at http://www.flickr.com/services/api/

A multi-page POST is the hard part, and for this you need to enable apache-mime4j-0.6.jar and httpmime-4.0.3.jar.

MultipartEntity mp = new MultipartEntity( HttpMultipartMode.BROWSER_COMPATIBLE); for (String key : params.keySet()) { try { mp.addPart(key, new StringBody(params.get(key), UTF_8)); } catch (UnsupportedEncodingException uee) { // UTF-8 is always supported } } 
-1
source

Source: https://habr.com/ru/post/1303328/


All Articles