I tried to build an app showing some pictures from the internet.
I used a function, which works great on my Phone (Galaxy S3 - Android 4.3) but on the watch i get a java.io.EOFException
exception.
The code (works on phone):
private class DownloadImageTask extends AsyncTask<String, Void, Bitmap> {
ImageView bmImage;
public DownloadImageTask(ImageView bmImage) {
this.bmImage = bmImage;
}
protected Bitmap doInBackground(String... urls) {
String urldisplay = urls[0];
Bitmap mIcon11 = null;
try {
InputStream in = new java.net.URL(urldisplay).openStream();
mIcon11 = BitmapFactory.decodeStream(in);
} catch (Exception e) {
//Log.e("Error", e.getMessage());
e.printStackTrace();
}
return mIcon11;
}
protected void onPostExecute(Bitmap result) {
bmImage.setImageBitmap(result);
}
}
Other functions throw a org.apache.http.NoHttpResponseException
The watch is paired and online as i can use voice commands and search the web etc.
So the question: Can i access the web directly from Android Wear or do need to handle all these tasks on my phone? Or is there something wrong with my setup?