Tag: google
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 |
Obovweb source code – a Google Appengine sample
by ricardoz on Oct.20, 2009, under Security, Tips, Web related
Someone asked me about the implementation details of the Google Appengine sample I published a few weeks ago (http://obovweb.appspot.com/). Well, you can get a hold of the source code here.
There’s not much to tell, apart from the specific HMAC-SHA1 implementation (which you can check out in Obovs source code) it’s a very simple JSP/DWR application.
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.
Blocking multiple clicks real easy
by ricardoz on Aug.10, 2009, under JavaScript, Performance, Security, Web related
I’ve faced this problem a few times before, but this time I decided to find a generic solution to it. I needed to prevent users from clicking action links in a web application multiple times and therefore triggering some server side action a lot of times when only one time was enough/needed.
After looking around for a few hours for an elegant solution I just couldn’t find one, all the articles/answers I found required controls on each link and/or special handling on the server side code that reacted to them.
(continue reading…)
Trying out Google Appengine – OTP generation app
by ricardoz on Jul.15, 2009, under Security, Web related
I decided to try out the new Java based version of Google Appengine. So i wrote a very simple web app that allows the user to generate one time passwords (OTP) using the HMAC-SHA1 algortihm (see OATH).
You can check it out at http://obovweb.appspot.com. As the name suggests its based on my obov library.
(continue reading…)