Discussion Forums  >  Maps, Device Location, Tracking

Replies: 28    Views: 142

RobK
Lost but trying
Profile
Posts: 73
Reg: May 19, 2012
Milton Keynes
6,530
10/03/12 03:27 PM (11 years ago)

Maps only partially working

Hi, I created a quiz plugin for an existing app and had to download the source file again. But I copied the new files into my existing app in Eclipse which works fine but now the map doesn't show up (grey grid) when loaded but shows if I use tap on a location pin and tap on directions. Dont know if it's pertinent but when I recompiled i forgot my keystore password so used the create keystore function to rebuild the app. Any ideas?
 
Tony @ Buzztouch
buzztouch Evangelist
Profile
Posts: 528
Reg: Mar 05, 2011
Saint Louis, Mi...
24,620
like
10/03/12 09:30 PM (11 years ago)
Add it and recompile
 
RobK
Lost but trying
Profile
Posts: 73
Reg: May 19, 2012
Milton Keynes
6,530
like
10/04/12 11:54 AM (11 years ago)
add what? to where? and how? the keystore was added and it compiled the apk file
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/04/12 12:33 PM (11 years ago)
I added the keystore to the strings.xml file, located in res -> values folder. I'm getting the grey grid also.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
10/30/12 10:48 PM (11 years ago)
I am also still only getting the grid and location marker, no map in the background. I have done all (I hope) the necessary steps, added my Google maps key to strings.xml, cleaned and rebuilt my app (I have my device attached by usb) but still no go. Any ideas guys?
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/31/12 05:40 AM (11 years ago)
Maybe I can help, I had this happen and was able to fix it. Do you have your MD5 yet?
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/31/12 05:46 AM (11 years ago)
Make sure eclipse is using java version 6 (jre6) Window -> Preference -> Java. (I was using Jre7 but built a keystore for jre6, big mistake) When using google maps api, you must use jre6 and retrieve the MD5 fingerprint. Take that finger print and paste it into the strings.xml file, use the ID from the strings file and apply to the appropriate layout.xml file. Export the file and deploy on the device without the emulator. I have also found that is you are using jre7, you must make sure eclipse is using jre7 and retrieve keystore using the verbose (-v) option Here are some resources that were referred to me that might assist you: http://www.buzztouch.com/files/howtos/buzztouch_For_Android-A_Users_Guide.pdf https://www.youtube.com/watch?v=IaXE2FUENFI
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 08:46 AM (11 years ago)
Hi Mad Padge, thanks for offering to help. -I added jre6 in Window->Preferences->Installed JREs->Add and switched Eclpse to use it. -I obtained both debug and release MD5 fingerprints using Keytool and plugged those in at Google Maps and received API keys for both. - I copied and pasted both into their respective lines in the stings.xml file - I ensured that debuggable=false in the Manifest - Cleaned the project - Connected my phone via usb - Ran the project on my phone - Still no map ! :( only icons for my device location and the 2 locations I set up in the BT control panel - Don't know what else to do now :(
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 08:51 AM (11 years ago)
Are you sure your retrieved the MD5 and not SHA1?
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 08:56 AM (11 years ago)
Yes, both debug and release are MD5. Google won't accept SHA1.
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 09:01 AM (11 years ago)
navigate to screen_map.xml, what does the "android:apikey" say? also do you have" android:enabled="true"and "android:clickable="true" set? Make sure your manifest xml says <uses-library android:name="com.google.android.maps" android:required="true"> If this doesnt work, open up log cat and post the error regarding google maps.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:06 AM (11 years ago)
screen_map.xml says android:apiKey="@string/googleMapsAPIKeyRelease" Manifest says <uses-library android:name="com.google.android.maps"/> ...hmmm there is a bit of difference....I will try your version.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:13 AM (11 years ago)
I tried your version this is what it looks like: <!-- THE NEXT LINE IS ONLY USED IF MAPS ARE USED --> <uses-library android:name="com.google.android.maps" android:required="true"> </application> I get an error on the </application> line that says: The element type "uses-library" must be terminated by the matching end-tag "</uses-library>".
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:16 AM (11 years ago)
I added </uses-library> to the next line and the error went away. Still no map :(
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 09:29 AM (11 years ago)
Check the manifest, is debuggable set to false?
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:34 AM (11 years ago)
Yes debuggable is set to false. Here is a snippet from the LogCat: 11-03 00:27:47.418: W/ZZ(363): BT_screen_menuListSimple:onCreate 11-03 00:27:47.418: W/ZZ(363): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "Menu" 11-03 00:27:47.418: W/ZZ(363): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#FFFFFF" 11-03 00:27:47.418: W/ZZ(363): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "Menu" 11-03 00:27:47.428: W/ZZ(363): BT_screen_menuListSimple:backgroundWorkerThread this screen does not use a background image 11-03 00:27:47.438: W/ZZ(363): BT_fileManager:deleteFile 29419A3B4B83603F6AB8A05_screenData.txt 11-03 00:27:47.438: W/ZZ(363): BT_fileManager:deleteFile 29419A3B4B83603F6AB8A05_screenData.txt does not exist 11-03 00:27:47.478: W/ZZ(363): BT_screen_menuListSimple: start GPS is set to YES in the applications configuration data, trying to start GPS 11-03 00:27:47.478: W/ZZ(363): BT_screen_menuListSimple: user has not prevented the GPS from starting using a BT_screen_settingsLocation screen 11-03 00:27:47.478: W/ZZ(363): BT_screen_menuListSimple:startListening (started listening for location changes) 11-03 00:27:47.488: W/ZZ(363): BT_screen_menuListSimple:startListening asking for GPS locations updates... 11-03 00:27:47.488: W/ZZ(363): BT_screen_menuListSimple:onStart using data from app's configuration file 11-03 00:27:47.488: W/ZZ(363): BT_screen_menuListSimple:parseScreenData 11-03 00:28:04.677: W/ZZ(363): BT_screen_menuListSimple:handleItemTap loads screen with itemId: "5896AC45B1E0B30251537DB" 11-03 00:28:04.699: W/ZZ(363): BT_application:getScreenDataByItemId 5896AC45B1E0B30251537DB 11-03 00:28:04.699: W/ZZ(363): BT_application:getScreenDataByItemId screenType is BT_screen_map for screen with nickname: LocationScreen 11-03 00:28:04.699: W/ZZ(363): BT_act_controller:loadScreenObject for screen with nickname "LocationScreen" and type "BT_screen_map" 11-03 00:28:05.057: W/ZZ(363): BT_screen_map:onCreate 11-03 00:28:05.067: W/ZZ(363): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "LocationScreen" 11-03 00:28:05.067: W/ZZ(363): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "LocationScreen" 11-03 00:28:06.788: W/ZZ(363): BT_screen_map:onStart using cached screen data 11-03 00:28:06.788: W/ZZ(363): BT_fileManager: readTextFileFromCache: "5896AC45B1E0B30251537DB_screenData.txt" 11-03 00:28:06.788: W/ZZ(363): BT_screen_map:parseScreenData 11-03 00:28:06.818: W/ZZ(363): BT_screen_map:showMapPins 11-03 00:28:06.818: W/ZZ(363): BT_screen_map:showMapPins
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 09:34 AM (11 years ago)
Also, what permissions do you have set for your app?
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 09:36 AM (11 years ago)
Is there anything in logcat referring to PID 179, or application com.google.process.gapps ?
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:43 AM (11 years ago)
The permissions for my app on my phone are: Your location Storage Network communication Phone calls Development tools Netwrok communications
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 09:46 AM (11 years ago)
Try adding the following permissions: Internet Access_Network_State Access_Fine_Location Access_Coarse_Location Read_Phone_State Write_External_Storage after that, delete the app from your device,save the project in eclipse, export the device as an apk, then email the apk to yourself. Open the email on your device and download on the device.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:47 AM (11 years ago)
Nothing for PID 179 These are for com.google.process.gapps 11-02 23:55:37.348: I/ActivityThread(167): Publishing provider com.google.settings: com.google.android.gsf.settings.GoogleSettingsProvider 11-02 23:55:37.998: I/ActivityThread(167): Publishing provider com.google.android.gsf.gservices: com.google.android.gsf.gservices.GservicesProvider 11-02 23:55:38.178: I/GservicesProvider(167): Gservices pushing to system: true; secure: true 11-02 23:55:38.178: I/ActivityThread(167): Publishing provider subscribedfeeds: com.google.android.gsf.subscribedfeeds.SubscribedFeedsProvider 11-02 23:55:39.098: I/ActivityThread(167): Publishing provider com.google.android.providers.talk: com.google.android.gsf.talk.TalkProvider 11-02 23:55:41.358: I/EventLogService(167): Aggregate from 1351869087065 (log), 1351869087065 (data) 11-02 23:55:44.388: I/GTalkService(167): [ServiceAutoStarter] --- connectivity changed 11-02 23:55:44.388: I/GTalkService(167): [ServiceAutoStarter] --- start GTalk service --- 11-02 23:55:44.488: D/GTalkService(167): [GTalkService.1] ### onCreate ### 11-02 23:55:45.658: D/GTalkService(167): [GTalkService.1] setBackgroundDataWithLock: mBackgroundDataEnabled=true 11-02 23:55:45.698: D/GTalkService(167): [GTalkService.1] onStartCommand: found 0 connections, force audit connections... 11-02 23:55:46.678: D/dalvikvm(167): GC_FOR_MALLOC freed 3936 objects / 278096 bytes in 649ms 11-02 23:55:46.678: D/GoogleLoginService(167): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService } 11-02 23:55:46.698: W/GoogleLoginService(167): Device has no accounts: sending Intent { act=com.google.android.gsf.LOGIN_ACCOUNTS_MISSING } 11-02 23:55:46.778: D/GTalkService(167): [GTalkService.14] account missing 11-02 23:55:46.798: D/GTalkService(167): [GTalkService.13] account missing 11-02 23:55:50.008: I/GTalkService(167): [ServiceAutoStarter] --- received boot intent broadcast 11-03 00:00:51.068: D/dalvikvm(167): GC_EXPLICIT freed 3236 objects / 416392 bytes in 600ms 11-03 00:25:52.348: I/EventLogService(167): Aggregate from 1351871752072 (log), 1351871752072 (data) 11-03 00:25:57.518: D/dalvikvm(167): GC_EXPLICIT freed 2812 objects / 248712 bytes in 138ms 11-03 00:28:23.348: D/dalvikvm(167): GC_EXPLICIT freed 417 objects / 18488 bytes in 145ms 11-03 00:38:57.938: D/dalvikvm(167): GC_EXPLICIT freed 249 objects / 10688 bytes in 138ms
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:48 AM (11 years ago)
Ah I thought you meant the permissions in my phone for the app. Those are permissions in the Manifest right ?
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:56 AM (11 years ago)
Installing it via an email attachment works ! The map is there ! So why can't I get it to work directly thru Eclipse ?
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 09:58 AM (11 years ago)
Mad Padge you are awesome!. Thanks for your help and patience.
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 10:03 AM (11 years ago)
Awesome! Glad I could help!
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 10:05 AM (11 years ago)
Not sure why it doesnt work through eclipse... maybe a small bug :/
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 10:10 AM (11 years ago)
I'll keep trying thru Eclipse but at least I've got a working app now ! Cheers man. All the best !
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
11/02/12 10:31 AM (11 years ago)
Not sure why it doesnt work through eclipse... maybe a small bug :/
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/20/12 04:21 AM (11 years ago)
There is a separate API key for the ADV. One for ADV, one for Release. You have (only) the one for Release. There are How Tos about this here, but I was unable to successfully get and install the one for ADV. But once accomplished, others say it works. Mine works on my phone, and I am happy.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.