Discussion Forums  >  Maps, Device Location, Tracking

Replies: 18    Views: 241

farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
03/03/14 03:27 AM (10 years ago)

Android maps issues again

Hi Guys, I hate to post this question because it is so well documented on the forum but I can't get the Android map to work... OK, this is my second Android app, this one is with the old core. I am skipping debug and going straight to release mode since the app is ready. So, what I did was: - Get a new API key form the Google console - Paste this key in <string name="googleMapsAPIKeyRelease">Mykey</string> - Made sure that the manifest displayed android:debuggable="false" - Signed and saved the .apk on dropbox and instal on device The pins are there but not the map. I am obviously missing something here, any pointers? Cheers, Farcat
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 04:56 AM (10 years ago)
I don't if it is relevant but I have changed the name of the project with the refactor tool. I did generate the APi key using the new name though. Farcat
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
03/03/14 05:41 AM (10 years ago)
Shouldn't matter. Did you try the old key? Did you generate a keystrore with this package?
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 06:11 AM (10 years ago)
Thanks LA, I have only tried the key that the Google console currently generates (presumably this is the new key). How do I generate the old key? I have a release keystore that I generated when I did my first Android app, I used that key store to request the API key. I don't need a different keystore per app, correct? Cheers, Farcat
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
03/03/14 06:19 AM (10 years ago)
If that keystrore was used for another App then yes you need another keystrore. Not positive but almost 90% sure. Try that and get another map key and see what happens
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 06:25 AM (10 years ago)
OK dokey, trying this now. :)
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 07:05 AM (10 years ago)
OK, I generated a shiny new release keystore, got a new Api key with it. Stuck it on <string name="googleMapsAPIKeyRelease">, uploaded to device. Still no map :( From what I read, on this BT version we only need to add the Api key to the strings.xml file, nowhere else? Cheers, Farcat
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/03/14 09:08 AM (10 years ago)
Hi Farcat, If you're trying to get a new API key for this app, then it won't work. Google stopped supporting the Google Maps API for Android v1 about a year ago, which is one of the reasons that we had to move to the new BT v3 core files. There's actually no way to currently get a key that will work for the old BT v2 files, so unless you have one from a long time ago, you're unfortunately out of luck. But, if you do have one from a previous app, and can sign your new app with the release keystore you used to generate that key, then you could use that pair. Mark
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 09:12 AM (10 years ago)
Hi Mark, Thanks for that. I am still trying to get my head around all the Android terminology but I now understand. So, in a nutshell, if we download our app using the BTv2 source code we cannot use the maps (unless we have an old key). I don't have an old key. So I just need to download a new source code with BT v3 core and use the new API key. Trying this straight away :) CHeers, Farcat
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/03/14 09:14 AM (10 years ago)
Hi Farcat, That is correct : BT v2 using the Google Maps API for Android v1, and BT v3 uses the Google Maps API for Android v2. If you do have an old key, you can use it. Also keep in mind that the new maps don't work on an emulator, so you have to test it on a real device. Good luck! Mark
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
03/03/14 09:42 AM (10 years ago)
Oh good catch! I forgot about this LA
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 02:25 PM (10 years ago)
Mhmm, got my new package, started the process again and still no map showing on device. I wonder if I did a mistake when requesting my API key. When one paste down the SHA1 Fingerprint, what should follow? the project name? So if my project name is My App (two words) I should type: F0:F5:94:74:B3:8I:F1:EC:57:FF:B2:13:D1:CE:A7:33:4C:BA:17:82;com.My App? (Not a real code by the way) Correct?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/03/14 02:28 PM (10 years ago)
When you request your API key, you provide your packagename, from the AndroidManifest.xml file (like com.sweetcoolapp), and the SHA1 fingerprint from your keystore. That will then provide you a API key that gets pasted into your manifest file. Mark
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 02:36 PM (10 years ago)
Lightbulb moment! Thanks Mark, that must be it. I renamed the package but on the manifest it is still the old one and this old name needs to be used to generate the key :) Trying now. Farcat
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 02:42 PM (10 years ago)
Yep, it's working. Thanks guys. I feel like the king of the world :) Farcat
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/03/14 02:46 PM (10 years ago)
Rock on! Good luck with the app!
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 02:53 PM (10 years ago)
Cheers Mark! Starting to kinda-almost-sort-of understand and like Android (slowly...)
 
Firefly
Lost but trying
Profile
Posts: 1
Reg: Jan 29, 2014
Portland
2,260
like
03/03/14 08:15 PM (10 years ago)
Can someone please tell me how to download the app using BT v3?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/03/14 09:26 PM (10 years ago)
Hi @Firefly, Welcome to Buzztouch! Check out this video I did...should show you what you need: http://youtu.be/UgurXKgP2AE Mark
 

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.