Ich möchte URI eines Bildes von URL, die auf dem Server gespeichert ist. Ich habe das versucht. uri = neuer URI ("http://www.google.com/");Wie bekomme ich Uri von einem Bild von der URL?
und
ri uri = Uri.parse ("http://www.facebook.com");
Ich möchte URI eines Bildes von URL, die auf dem Server gespeichert ist. Ich habe das versucht. uri = neuer URI ("http://www.google.com/");Wie bekomme ich Uri von einem Bild von der URL?
und
ri uri = Uri.parse ("http://www.facebook.com");
Möchten Sie die Bilddatei in Ihrem Gerät speichern oder was genau Sie wollen.
ImageView.setImageURI (Uri.parse ("http://www.facebook.com"));
oder Sie müssen es in Ihrem Telefon speichern.
// download AsyncTask private Klasse download AsyncTask {
@Override
protected void onPreExecute() {
super.onPreExecute();
// Create a progressdialog
mProgressDialog = new ProgressDialog(MainActivity.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();
}
return bitmap;
}
@Override
protected void onPostExecute(Bitmap result) {
// Set the bitmap into ImageView
image.setImageBitmap(result);
// Close progressdialog
mProgressDialog.dismiss();
}
}
Ich möchte dieses Bild mit anderen Apps teilen –
Ich verstehe nicht, was du machst ..! Sie möchten die Bildanzeige in App oder das Bild wie Whats App zu einem anderen Völker wie teilen –
Weder http://www.google.com/ noch http://www.facebook.com/ gelten Bild URIs –
Was erstreckt, falsch mit deinem Code? Du hast es nicht erzählt. Und das ist in der Tat keine Bild-URL. Aber das ist nicht so wichtig. – greenapps