Android
View Androids emulator log from Eclipse
by ricardoz on Nov.19, 2009, under Android, Tips
Sounds like it should be quite straightforward, right? Well, it is, but for some reason it took me more than a few minutes (maybe I need to get more sleep :P). Anyway, to view Androids emulator log from Eclipse go to Window / Show View / Other… / Android / LogCat
Get a web page programatically from Android
by ricardoz on Nov.18, 2009, under Android, Tips
The Google folks were kind enough to include a version of the Apache HTTP Client in the Android SDK, ergo loading a web resource/page from our Android apps is really simple:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpGet httpGet = new HttpGet("http://www.spartanjava.com"); HttpResponse response = httpClient.execute(httpGet, localContext); String result = ""; BufferedReader reader = new BufferedReader( new InputStreamReader( response.getEntity().getContent() ) ); String line = null; while ((line = reader.readLine()) != null){ result += line + "\n"; } // Now you have the whole HTML loaded on the result variable |
Building androids
by ricardoz on Sep.04, 2009, under Android
I’ve been trying out the Google Android platform, and I have to say I’m quite pleased with it. The bundled Java API and VM seem to work very well and the development tools (Eclipse plugin and SDK) work just fine.
You can tell a lot of thought has been put into the API and the proposed development “style”, and the tutorials and documentation are easy to follow and do not deviate to marketing and commercial stuff.
Anyway, stay tuned if you want to get into it, I will post an app to the marketplace soon enough.