How to create from Imageurl? File
I know how
Download image from Url with AsyncTask
I want to know how I can create an object without loading an image from a URL. File
I tried as shown below.
File file = new File("http://www.planwallpaper.com/static/images/Winter-Tiger-Wild-Cat-Images.jpg");
I want to use this file in the status.setMedia file (file)
StatusUpdate status = new StatusUpdate(twitterMessage);
status.setMedia(file );
try {
twitter4j.Status response = twitter.updateStatus(status);
return response.toString();
} catch (TwitterException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
But no success.
Please help me create a file directly from imageurl without uploading an image.
source
share