richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
08/31/14 11:09 PM (9 years ago)

Location map - debug & release ?

I have spent about 6 hours on this now and I seem to be getting nowhere. I created what I thought was a release keystore certificate and got an API number and added it to my app. The map would not open. So I read just about everything on here and went to preferences, for the app, to find I had created a debug certificate. I then tried to create a release certificate and got the same API number. How do I get to a release certificate with the same API number? If this was not confusing enough why do I need a release & debug certificate if I can only put one into the Android Manifest.xml file.
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/01/14 01:04 AM (9 years ago)
I only ever use release certs now, even when I register a new App for API use - I create the App, export the APK (creating new cert on export) and then use Keytool to view the SHA1 string. Once I have that, I add the string and package name in the API console (allowed simple API certs list) and then add the key to my manifest. If you put both the debug and release SHA1 into the same "Simple API access box" in the API Console then they will and can use the same API key. You can have many Apps / SHA1 using the same key.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/14 01:12 AM (9 years ago)
Like RBurns, I rarely use 'debug' anymore. You can test just fine with your release key, and why go through the same heartache twice. Just remember when you test with your release, 'debug' in the manifest must be set to 'false'. The 'keystore' is just that; a secure place to store your keys. However, the SHA1 Fingerprint will be different depending on if it's a debug keystore, or a release keystore; the SHA1 fingerprint is created from your app certificate. Cheers! -- Smug Note: This response has been corrected from an earlier comment that wasn't 'quite' accurate.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/01/14 02:25 AM (9 years ago)
Ok guys. I thought I got what you said but.. I just created a new release cert. Copied the 'release' SHA code (I know it was release because the created cert said release and also I did preferences and the debug SHA code that I could see was different). I then pasted the release SHA in the create new Android Key box, added the extension, and then copied the new API and put into the Android Manifest.xml file in the right place. I then changed the android debuggable to false. Still no map. However, when I click through to where the map is supposed to be I get a black telephone with a no entry sign on it and clouds above it - usually this means the plugin cannot be found but there is no usual message saying plugin missing? Richard
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/01/14 02:33 AM (9 years ago)
Only seen this when trying to run on emulator or if the location map plugin is in fact missing from your project?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/14 02:37 AM (9 years ago)
If you haven't read it already, I did up a little tutorial on this process... https://www.buzztouch.com/files/howtos/googleapiv2.pdf and remember the simulator doesn't show maps; if you're not using a 'real' device, that's reason #1 why it's not working. I've only had my android system 'not recognize' a plugin as not there, when it was there. Try to do a 're-sync' (F5?) of your project. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/01/14 02:38 AM (9 years ago)
It's a test app I created early this morning with just a simple menu and a location map. One page linking to the map. I am trying to run on an emulator - will it only run on a device (which I don't currently have)?
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/01/14 02:40 AM (9 years ago)
:) we entered a response at the same time
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/14 02:41 AM (9 years ago)
Oh, yeah. Dumbest thing in the world, but there it is. No device, no maps. I have no idea why Google would do that, but it is what it is. And as a 'by the way', it's not BT; it's Android. My offline maps, which use absolutely no google anything, will not show on an emulator. I don't think very much of that behavior, as you might guess. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/01/14 02:45 AM (9 years ago)
Hi Smug. I went through that tutorial and the other 9 page one about 3 times. Plus the keystore video and read all the entries from around June this year that included inputs from you and rburns. I think I may be ok on the API code now but I will have to look into using a friends phone - I was thinking of buying a Samsung anyway but I don't really use phones that much and having an iPhone and a Android device just seems ridiculous to me as a user but I guess as a developer it will have to happen.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/14 02:56 AM (9 years ago)
When you do get your own device, make sure that it's API 14 (Android 4.0+) or above; you wouldn't want to buy something that wasn't going to work with BT anymore... I was surprised to find that they're still selling Android v2.1 phones on my island, and those won't work with just about 'anything' anymore. But they're dirt cheap. My Android test device isn't a phone; it's a 'Galaxy Tab 2' 7" Tablet that cost me around $150 or so. I used to use it quite a bit until I got my iPad mini, but it's still my primary Android dev device. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/01/14 03:09 AM (9 years ago)
I am assuming that I can't plug an Android device into my Mac. Do I have to save the file and export it? I did that once before many months ago. Seems a bit long winded when minor changes have to be made. Richard
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/14 04:19 AM (9 years ago)
You can plug the Android device into the Mac; no problem. Be sure to set the device "developer options" so that it can be recognized by eclipse. That will vary from device to device, but it's going to be in the device settings 'somewhere'. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/02/14 10:09 PM (9 years ago)
Ok. Got device - actually Samsung Galaxy Core 2 (not a bad phone) and after some searching got the developer to work. I just created a new app (simple) but when I get to the map its the same black phone with no entry sign and clouds above it. I have taken the SHA number and got a new API key (got this working well now) and the debuggable is set to false. BTW - the same app works perfectly on Xcode simulator. So the plugin is there. The error message is "There was a problem creating a Google Map. In most cases the error occurs because the Android Project was configured properly to run Google Maps". I am guessing it should read WAS NOT - but hey.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 12:23 AM (9 years ago)
I must be close to this working because the error message is located in the BT_screen_map.java file within the app. There are 4 warning triangles. They are in the Layout Params with the FILL PARENT struck through - I have no idea what this means?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/03/14 12:50 AM (9 years ago)
It sorta sounds like the API key isn't quite right still... Make sure that the SHA key you get is 1) Created via the release key 2) You obtained your SHA1 fingerprint from the keystore: https://dl.dropboxusercontent.com/u/115208762/quickkey.png Cheers! -- Smug
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 01:16 AM (9 years ago)
I had this a while ago and it was one of the following (sorry, can't remember which one)!! 1. google play service lib 2. API key pasted into correct part of the manifest 3. Maps V2 actually enabled in API console services screen 4. Delete the package, recompile and download from BT - just edit the manifest and paste in the correct API key - nothing more needed. 5. Project clean. 6. Permissions - ensure all required permissions are there in manifest. Sorry - I went through the mill as well and one / combination of those sorted it for me; especially recompile/download again from BT!!
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 01:25 AM (9 years ago)
I am sure I have that bit right now. I just copy the SHA1 fingerprint from the release keystore go to Chrome and create new Android Key. Semi-colon, app name and hey presto the new API key for maps. Copy and paste in to AndroidManifest.xml at maps v2 api key android:value= and should be good to go. In the training video it says to use the MD5 fingerprint but I think that is out of date now because I could not find anywhere to put that.
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 01:33 AM (9 years ago)
If you have "teamviewer" I don't mind taking a look?
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 01:52 AM (9 years ago)
I will have in a minute or so. I will set it up and come back to you. Many thanks Richard BTW I just tried recompiling and still no map
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:03 AM (9 years ago)
How does teamviewer work ?
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:04 AM (9 years ago)
Do I create a meeting?
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:07 AM (9 years ago)
Do I create a meeting?
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 02:27 AM (9 years ago)
You will have an ID and a password - if you message me your ID, I use TeamViewer to connect - it will then ask me for your password (all numeric) which you can message me too!
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:30 AM (9 years ago)
762874653 is ID but P/W is alpanumeric
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 02:32 AM (9 years ago)
Thats ok - is you message me your p/w Ill try and connect :)
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:35 AM (9 years ago)
jqi883
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 02:37 AM (9 years ago)
Mmmm - tells me your password is invalid!
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:45 AM (9 years ago)
That was the P/W it gave me on launching. I have just signed up and am now logged in to the homescreen
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:48 AM (9 years ago)
Can you start a meeting and let me join it? I rarely use these meeting programs and this one is new to me.
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 02:48 AM (9 years ago)
Not sure whats happening there! Use Teamviewer to connect all over the globe but it wont connect to you :(
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 02:49 AM (9 years ago)
Its a one way street - you connect to gain remote control of the computer you are connecting to, so connecting to me wouldn't help!
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 02:52 AM (9 years ago)
Can I start a meeting and you join?
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/03/14 02:59 AM (9 years ago)
Lets try that
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 03:00 AM (9 years ago)
I have the Team Viewer box up in the corner of the screen. The Meeting ID is m07-218-992
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 03:07 AM (9 years ago)
Hello, Please join the meeting, by clicking on this link: http://go.teamviewer.com/v9/m07218992 Meeting ID: m07-218-992 Regards, Richard R Emery www.teamviewer.com - Easy online meeting & screen sharing
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/03/14 06:33 AM (9 years ago)
We have come to the end of our free time on Team Viewer. Not sure if it's a daily allowance or what? You have been a great help - at least we know what the problem is now. Never occurred to me that the google play lib was not actually functioning correctly. If you can send me a link I can get up early tomorrow an download everything. I am shattered I have been at this for nearly 12 hours with barely a break. My direct email is [email protected] and skype is richardremery. Hopefully we can pick up on this later - unless you are bored and/or need to go earn money instead of just helping me. I will send this as a personal message here as well.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/05/14 11:54 PM (9 years ago)
I have almost got this working now. I tap menu item to go to a map and the new page is a map or rather it would be if a map was showing. It is a blank page with map buttons. During my rather long Team View with Rob the other day he mentioned putting a google jar file in Java Build Path/Libaries but I can't remember how it was done. Not sure but if this is where the maps are stored then it could be the answer.
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/06/14 01:04 AM (9 years ago)
Hi Richard, Have a look at section 4 in my PDF: https://www.dropbox.com/s/9a6vdpgpls86tma/GoogleMapsV2_Setup.pdf?dl=0 Hope that helps :)
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/06/14 02:00 AM (9 years ago)
Hi Rob Very informative document. Alas still no map. Could it be I have set the Android level at 4 and my device (phone) is 4.4? I have downloaded 4.4 (actually 4 through 4.4) from the SDK manager. All the extras are added except Google Play services for Fit Preview & Google Play services for Froyo. The other thing it could be, just a thought, not enough space on my device. It's a new phone but only came with 4GB of which I only have 1.15GB of space left. There is a facility to add a further SD card with as much memory as I can afford :) Richard
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/06/14 02:18 AM (9 years ago)
If your phone version is 'higher' than your app version, no problem. A phone running v4.4 has no issue running software compiled for v4.0; but a phone running v4.0 won't run software compiled for 4.4 I'm hoping you've got your device connected to the computer while you're testing. If so, delete the app from the device, and clean your project within eclipse. Launch the app on the phone, and at the menu screen (or whatever screen is available 'before' you get to maps) clear your logcat. Then tap the menu to navigate to your map screen. Let it load completely. Then comb the logcat for some kind of indicator of why it's not displaying a map. If it loads successfully, or if it doesn't load successfully, it all goes in the logcat. The answer is in there somewhere. Cheers! -- Smug
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
09/06/14 02:27 AM (9 years ago)
Also Richard - if the map pins are loading it suggests its actually there in my mind - are your points very close together? Asking as it may have zoomed in to the pins giving the impression the map isnt actually loaded - try zooming out (pinch to zoom) and also check on your phone connection for location services as slow or none could be causing your issue too.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/06/14 03:52 AM (9 years ago)
Ok. Well I unplugged the phone and deleted the app. I then cleaned the project. Saved it to desktop and sent it via email to myself. I then installed it on the phone and cleared the logcat on the Mac. I then tapped to load map and the top icon flashed and flashed for about 2 minutes but no map. Also the Logcat did not show anything with the project highlighted.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/06/14 06:17 AM (9 years ago)
You'll need your device attached to the mac while eclipse is active to get 'live data' in your logcat while the app is running... not compiling and installing as separate tasks; this sort of compiles 'adhoc' while in the eclipse environment and loads it to the phone while all of the data streams to the logs. I hook my device up via the USB cable, and press the green "Run" button (sorta looks like an audio 'play' button). Is that how you have your workflow configured? Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/06/14 07:39 PM (9 years ago)
Hi Guys. Another day at it. Well, my new download of Eclipse is already playing up. It won't recognize my phone. Normally when Eclipse opens there is a message (I admit I don't really read it) that says something like Allow or Deny external blah blah and I always click Allow. That message is not coming up now. Re: your last message Smug. That is how I was set up and the Logcat was going crazy.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/06/14 08:03 PM (9 years ago)
Sometimes eclipse doesn't recognize my device when attached; I merely unattach it, and reconnect. Hope yours is that simple too. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/06/14 08:09 PM (9 years ago)
Not that lucky I'm afraid. Tried that. And tried closing and reopening Eclipse. Turning the Mac off but I'm pretty sure it has to do with the Allow or Deny message which has not appeared the 4 times I have restarted. Can't believe I am going to have to uninstall and reinstall two days in a row.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/06/14 09:32 PM (9 years ago)
I have to wonder if it's just me. I have downloaded the Eclipse package twice now and each time I open it and run Elicpse I am getting the error SDK manager not found. This is on a second Mac. On my Mac when I download the package I am only getting 307KB of the Eclipse program.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 01:23 AM (9 years ago)
After doing nothing but downloading for nearly two days I am back to where Eclipse won't read my phone. The Allow/Deny message is definitely not showing.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/08/14 02:35 AM (9 years ago)
Silly question; in the phone settings themselves, do you have the 'developer mode' enabled? Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 02:55 AM (9 years ago)
Yep. That was a task in itself but did that shortly after buying it last week. The phone was showing in the Android Device Chooser 'top' box and it does not matter how many times I unplug and re plug in the phone it bleeps and says it is ready to be used but Eclipse just won't see it.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/09/14 04:13 AM (9 years ago)
Hey Guys. Finally got a map to open. I didn't do anything different except download a latest copy of Eclipse. Using a different Mac as well. As I could not get Eclipse to recognize my device I created an APK file and emailed to myself. It installs and shows a map now and my current position on that map but the pins won't show. I had already added one before the download and then I added one after but neither are showing.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/09/14 05:19 AM (9 years ago)
That is just so odd. I'm sorry you're having such hard times. On the brighter side, I've learned far more from my mistakes than my successes, so if nothing else, the experience is worth it. Glad you got it to work. Hope you can get 'your' mac settled down into a workable long term solution. What kind of Mac do you have? I'm running a 13" MBP that I got last year, with 10.9.4 as my OS. I have eclipse 4.2.1 in an ADT Bundle I got recently. Cheers! -- Smug
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/09/14 05:34 AM (9 years ago)
Hi Smug At least its a map :) So one more great step forward for .... well me I guess. 15" MBP - its 3 years old now & running same OS as yours. The Eclipse bundle I downloaded is the latest. On this Mac only about 30% of Eclispe will download - no idea why. I had deleted as much old stuff as I could find beforehand. So I am also using a newer MacBook Air. The same download of Eclipse and the SDK manager would not automatically work so I had to go through some of the different perspectives until I got it to show the SDK manager. This is where I am running the test apps for the map. Could the problem with the pins not showing be because I have not installed any Android API's before 4.0 and no obsolete files (I have some vague memory of you mentioning something about an obsolete file ages ago)? Richard
 

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.