The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

kumarjayanti (8) [Avatar] Offline
#1
Hi,

I tried to run the Where Do You Live app at the end of chapter 1. I entered the same text "white house" that is shown in the chapter, but after i click on the Show Map button nothing happens. It is not clear how i can debug it. I tried to put e.printStackTrace() in the onClick() method that starts this geo Activity but nothing appears eclipse console.

I checked my emulator is able to access internet via the browser.

Device API version is 8 (Android 2.2)
kumarjayanti (8) [Avatar] Offline
#2
Re: Ch1: Where Do You Live App : cannot get it to show the Map
LogCat output shows :


01-01 10:53:22.322: INFO/ActivityManager(62): Starting activity: Intent { act=android.intent.action.VIEW dat=geo:0,0?q=white+house }
01-01 10:53:22.332: WARN/System.err(242): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?q=white+house }
01-01 10:53:22.402: WARN/System.err(242): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:140smilie
01-01 10:53:22.402: WARN/System.err(242): at android.app.Instrumentation.execStartActivity(Instrumentation.java:137smilie


What do i need to do now ?.
wadael (6) [Avatar] Offline
#3
Re: Ch1: Where Do You Live App : cannot get it to show the Map
First, check that you use a "Google API" image with the simulator.

Google Api image can be summarized as Android + Google Apps (maps).
kumarjayanti (8) [Avatar] Offline
#4
Re: Ch1: Where Do You Live App : cannot get it to show the Map
yes thanks, i had figured that out. The book should have explicitly said this especially since it was a chapter 1 sample.
mikbe (1) [Avatar] Offline
#5
Re: Ch1: Where Do You Live App : cannot get it to show the Map
For the people using Kindle Fires you'll want to change this part:

Uri.parse("geo:0,0?q=" + address)

To this:

Uri.parse("http://maps.google.com/?q=" + address)

Amazon did not include the Google API's on our Kindle Fires so we can't use the geo library. It's not a satellite map but it's a simple fix to get you to the next chapter.