1

I am wondering if it is possible to make a background http request inside a live wallpaper (android service).

Thanks!

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
Bartosz Stankiewicz
  • 323
  • 1
  • 2
  • 10

1 Answers1

2

A live wallpaper is very similar to a normal Android application and has access to all the facilities of the platform. That includes network access.

Maurits Rijk
  • 9,789
  • 2
  • 36
  • 53
  • so you mean if I try something like this it should be no problem?try { HttpClient hc = new DefaultHttpClient(); HttpPost post = new HttpPost("http://www.yahoo.com"); HttpResponse rp = hc.execute(post); if(rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { str = EntityUtils.toString(rp.getEntity()); } }catch(IOException e){ e.printStackTrace(); } – Bartosz Stankiewicz May 26 '11 at 09:33
  • Only one way to find out, right? Make sure you set the right permissions for your application. – Maurits Rijk May 26 '11 at 09:38
  • this is the solution: thanks! – Bartosz Stankiewicz May 26 '11 at 10:49