0
i-Code haben das BildWie bekomme ich Bilder von Google Drive in Android-Anwendung?
private class DownloadImage extends AsyncTask<String, Void, Bitmap>
{
@Override
protected void onPreExecute()
{
super.onPreExecute();
// Create a progressdialog
mProgressDialog = new ProgressDialog(ClusteringMinimaTest.this);
// Set progressdialog title
mProgressDialog.setTitle("Download Image Tutorial");
// Set progressdialog message
mProgressDialog.setMessage("Loading...");
mProgressDialog.setIndeterminate(false);
// Show progressdialog
mProgressDialog.show();
}
@Override
protected Bitmap doInBackground(String... URL) {
String imageURL = URL[0];
Bitmap bitmap = null;
try {
// Download Image from URL
InputStream input = new java.net.URL(imageURL).openStream();
// Decode Bitmap
bitmap = BitmapFactory.decodeStream(input);
} catch (Exception e) {
e.printStackTrace();
}
if(bitmap!= null)
{
//saveToInternalStorage(bitmap);
}
return bitmap;
}
}
können Sie bitte Gesamt Quellcode zur Verfügung stellen? weil ich neu in Android-Programmierung bin, also bitte helfen Sie mir, das Bild von Google-Laufwerk Vielen Dank im Voraus! –