More Unlocking Android code examples up

Tagged:

I completed several more examples for the upcoming Unlocking Android book and posted them at the code hosting site.

WindWaves UnlockingAndroid screen shots

Specifically I finished a new project for chapter 11 - Location, Location, Location - which deals with LocationManager, LocationProviders, LocationListeners, MapActivity, MapView and all that stuff (all for the 1.0 SDK). WindAndWaves as it is called, is really more than an example, it's a full fledged app.

It grabs data from the NOAA's NDBC (National Data Buoy Center) and then based your current location (or a location you browse to from the map that is more than 100 miles from your actual location), it creates and updates the map with buoy markers. If you click on a buoy you get details about that spot in the ocean, and if you click "more detail" you get more info, and can link to the web site (yep, the buoys have their own web sites - complete with more data and historical charts and so on).

The idea for the app is to look at the combination of data and location awareness in a unique way - and to be useful in a marine setting - and to exercise all the Android location APIs.

There are also several other full on apps in the book and the code hosting site. WeatherReporter is a hand held weather radio with your standard weather reports, and it includes alerts when severe weather is near you (uses Yahoo! Weather APIs). RestaurantFinder lets you look up restaurant reviews using criteria you input (locality, cuisine, etc). The NetworkExplorer app does all kinds of networking stuff, sockets, java.net HTTP, Apache HttpClient HTTP, basic authentication, SSL, and so on (it includes getting Google Contacts using a ClientLogin token, and using HTTPS with the del.icio.us API as two of it's examples).

The Manning "Early Access" program site (MEAP) has all the updated chapters of the book and you can get it there if you so desire (it's not in print yet, will be early next year, but all the updated content is available in PDF delivery). The book is great, and I wouldn't complain if you bought it, but you don't have to buy it to get the code samples (making it nice for the people).

Comments

google client login.java

Hi i tried running your NetworkExplorer application,but i get a msg saying unresolved host when i try to connect to goole.com to fetch the contact details(using google client login.java).Any help or suggestions will be helpful.

GoogleClientLogin

I guess we are talking about this class: http://unlocking-android.googlecode.com/svn/chapter6/trunk/NetworkExplor..., and about "google.com" and not "goole.com"?

If so, should work if your emulator/phone has network connectivity. That is a basic networking error, not really an issue with this client - I have tested the client on 1.1 and 1.5 and it worked (haven't tried it yet on 1.6 or 2.0. but will soon).

Can you browse to google.com on the same emulator/phone?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.