Open davols opened 10 years ago
Several image sources that have pics online. More links: http://stackoverflow.com/questions/19805966/download-image-from-new-google-plus-photos-application http://stackoverflow.com/questions/21899884/download-image-from-new-google-plus-photos-of-gallery-with-image-extension
See new file sharing stuff: http://stackoverflow.com/questions/20559392/getting-videosnon-local-from-the-google-photos-app http://developer.android.com/samples/StorageClient/index.html
ParcelFileDescriptor parcelFileDescriptor = context.getContentResolver()
.openFileDescriptor(Uri.parse(path),"r");
FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor();
InputStream inputStream = new FileInputStream(fileDescriptor);
BufferedInputStream reader = new BufferedInputStream(inputStream);
// Create an output stream to a file that you want to save to
BufferedOutputStream outStream = new BufferedOutputStream(
new FileOutputStream(filePath));
byte[] buf = new byte[2048];
int len;
while ((len = reader.read(buf)) > 0) {
outStream.write(buf, 0, len);
}
Seems to be working now with https://github.com/davols/android-light-dasftp/commit/cd04b1eae9baecc93cb6bc903e793e940e92c97b. With at least picasa, not thru Google Drive.
Filepath is null when it comes to uploading picasa/G+ pictures.
See: https://groups.google.com/forum/#!topic/android-developers/s3BLfnI3F74 http://jimmi1977.blogspot.no/2012/01/android-api-quirks-getting-image-from.html and https://code.google.com/p/android/issues/detail?id=21234
Example: