将图像 URL 传递给 aviary 图像编辑器

Pass image URL to aviary image editor

我可以将图像 URL 传递给 aviary 图像编辑器而不是从厨房挑选照片吗?

我试过了

Intent newIntent = new Intent(this, FeatherActivity.class);
newIntent.setData(imageURI);
startActivityForResult(newIntent, 1);

但我想要 URL 而不是 URI。

试试这个:

String image_url = "http://www.test.com/abc.jpg";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(image_url));
startActivity(i);

看看,是否有效。

试试这个::

public class ImageFromUrlExample extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

ImageView imgView =(ImageView)findViewById(R.id.ImageView01);
Drawable drawable = LoadImageFromWebOperations("http://www.androidpeople.com/wp-content/uploads/2010/03/android.png");
imgView.setImageDrawable(drawable);

}

private Drawable LoadImageFromWebOperations(String url)
{
try
{
InputStream is = (InputStream) new URL(url).getContent();
Drawable d = Drawable.createFromStream(is, "src name");
return d;
}catch (Exception e) {
System.out.println("Exc="+e);
return null;
}
}
}