Android where is my car (Google Map display using ActivityStarter)

i'm working on Androidwheresmycar. I have downloaded original 'aia' file. It worked. I created my own app 'where is my car'. it is not showing the location as in the original one. I'm not able to find any missings in the app. any suggestions or help


1 Like

Your Blocks look fine.

When I run 'identical' code, the app shows up and runs as expected. Are you seeing a slightly different street address or something else? Slightly different addresses sometimes appear when the LocationAccuracy property changes. Small differences in CurrentAddress returned is normal. What address you see depends on the exact latitude and longitude the gps receiver returns on subsequent satellite fixes.

What you see is probably the result of how the CurrentAddress Block works

1 Like

Try this one..

can i copy this code directly to my project or i have to go to my blocks section and write this code on my own. how to copy this into my project. is there any way

Simply change the Blocks in the yellow rectangle.

Original one

this is my project output which i have created is not showing directions as shown above. it is saving address. it is showing 'Low Accuracy' in that point

  • Does the 'original' app consistently provide the display you show and the one you coded consistently provide the other display? Are both apps as you post your images the identical location?

I suspect you are dealing with the idiosyncrasies of Google's Map app (which your app is calling using the ActivityStarter). The diffference may be because the 'saved location to your TinyDB' is different in both cases or because the location you 'saved' is comparing it's location to your present location and the separation of the two points is very small or your 'saved' location is not yet saved.

You are in a large city in India. I expect the Accuracy varies significantly from satellite fix to satellite fix in the probable canyon of buildings When you next test your app, make sure the 'saved' location is a significant distance away from your present location. The point of the app is to compare a saved location on the TinyDB with your actual location. Are you sure you have a saved location in your TinyDB ? Did you provide time sufficient to acquire a satellite fix before you set the Remember My Current Location (wait at least a minute after you start your app so the gps receiver can wake up and decide where it is located) ?

When you run your app, make sure the red and green coordinates are set to values other than zero ( 0 ) on your real device. (The image shown is the emulator image)

If either set of coordinates are 0,0 , the app will not work correctly when you press either Button. Wait until the gps receiver finds where it is. :slight_smile:

Also note the app passes the CurrentAddress to Google Maps; the addresses must be different. Sometimes the coordinates of two locations too close together to provide an address from Google's database; if that happens you will have a confused Google Map.

Another potential issue is how your app is connected to WIFI or your cell provider data; one or the other is required to display Google's map.

You might re-read Using the Location Sensor and LocationSensor

Try again and let us know what you discover. The Where Is My Car app works fine for me (always) although some time it works slowly without WIFI.

Look also at this .aia file which shows the examples that others have already posted to you.
The file is a complete App published by me on the Play store thanks to all the advice of this forum and today is another post.