Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
10/28/12 02:25 PM (13 years ago)

Has Buzztouch android package download changed?

Has there been any change to the way android packages downloads are made as the part to enable driving directions in mine is now around line 585 and is normally at 593. When trying to add the tappedLocation.get() to the code it throws up error that "tappedLocation cannot be resolved" I thought maybe it was something to do with my eclipse but @CRTaylor appears to have same problem. See this post. https://www.buzztouch.com/forum/thread.php?tid=4ADE582AC6523EDB3953D3F Posted twice previously about this but never received any definitive answers from anyone. Thanks for any help anyone can offer for this.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/28/12 10:32 PM (13 years ago)
I'll look into this and post some findings tomorrow. Late here -:)
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/29/12 10:18 AM (13 years ago)
@David thanks for taking this up. Any further info on it? May be something im missing but i just don't know what as it always allowed changes in past with no problems.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/30/12 12:39 PM (13 years ago)
hi @Mr Stuck: Yup, been looking into this. Saw the other lengthy thread too. Good conversation over there. So, you're right, the showDirections() method did change a bit on the download server. There were lots of lines of code in this file (the old one) that were "unused" and these unused lines of code were causing the compiler to show warnings. Because these unused lines of code were removed, your line numbers have changed in BT_screen_map.java So, knowing that explains the line numbers. Next, regarding the tappedLocation.get(), where are you using this? Or, where are you trying to use it that is causing the issue? I'm a bit confused about this. It's looking like we "broke something" when we removed the unused code but I'll need help figuring out what / where it is. LOL. What won't work?
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/30/12 01:15 PM (13 years ago)
@David. Thanks. I always followed Fred's guide at myskylla to do this but done it a few times now so don't rely on it too much but it is described as changing the second set of tmpLatitude/Longitude and replacing the them with tappedLocation.getLatitude/Longitude(). Eclipse accepted this previously (even though i changed the first set instead of the second Set, oops) but now throws up the error that it can't be resolved. Sure it will be something simple but not being a coder ( although trying ) I could not figure it out. I released the app i was working on without directions with the intention of updating it when I can an answer becomes available. Thanks for helping
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/30/12 01:36 PM (13 years ago)
Aaaah before i forget (and this could be important from your end) I did compile and run the app without changing the tmp to tappedLocation.get and Instead of throwing up the message "Your device does not appear to be reporting its location" message, it did offer the option to open with maps etc. However the directions are to the users current location instead of the tapped location so it may be that something completely different needs to be changed in the code to correct it. Hope this helps. Thanks again.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/30/12 02:22 PM (13 years ago)
Cool...got it. BT_screen_map.java has been updated with the newly discovered error (on our part). Re-fetch a 2.0 project, have a look at the showDirections() method starting on line 572. The "old" file (the one from a few minutes ago before the update I just implemented) had the device going "from it's current location to it's current location" - too funny. It's not going "from it's current location to the location that was tapped." Duh! Thanks a bunch.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/30/12 02:28 PM (13 years ago)
Awesome. So this means no alteration is needed to enable driving directions now? Cool Thanks for assistance.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/30/12 03:11 PM (13 years ago)
That should do it. Can't believe this slipped so long. LOL
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/30/12 03:25 PM (13 years ago)
Oops, if you downloaded the new map file in the last few minutes you'll get an error. Should be OK now. Made the update earlier then uploaded the wrong file on the download server. Yikes.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/30/12 03:32 PM (13 years ago)
Just proves you are human after all. Lol Great news that we no longer have to have to change the code to get driving directions. May be a good idea to make a post about this as there may be some others scratching their heads over this. Thanks for taking the time to look into this.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
10/30/12 10:33 PM (13 years ago)
Hi stuck, Did you get it all working? I am still having problems with only the grid being displayed.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/30/12 10:38 PM (13 years ago)
@CRTaylor: The "grid only" display is not related to these changes - or this file for that matter. It's a matter of using the proper Google Maps API key and setting the debug=true (or false) value in the AndroidManifest.xml file. Probably best to do a quick Google search for "Android Google Maps gray map tiles" or something like that. You'll find a bunch of discussions about it. Common confusion point.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
10/30/12 11:13 PM (13 years ago)
Hi David, I generated a release keystore using the Keytool plugin. Got my Google maps API key, plugged it into strings.xml and set android:debuggable="false", cleaned and rebuilt my app and running it on my usb attached phone. Still displays grid only. Any help appreciated Cheers
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/30/12 11:41 PM (13 years ago)
Hi @CRTaylor, you'll get through this. Google and their beloved maps make it difficult sometimes. LOL. If you've followed most online info about creating Google Maps API keys, you probably have two of them. One for debug, one for release. Both of these are copy/pasted into the strings.xml file, like you seem to understand. So far, so good. Next, have a look at the screen_map.xml layout file in your /res/layout folder (in Eclipse). You'll see where the layout widget for the map "points" to the strings file. It will either be: android:apiKey="@string/googleMapsAPIKeyDebug" OR android:apiKey="@string/googleMapsAPIKeyRelease" The only difference in those two lines is what key the layout file is referencing (pointing to). Easy enough to understand. Lastly, the AndroidManifest.xml file is either debug=true or debug=false. The idea here is the the AndroidManifest is either in "debug mode" or not. If it's in debug mode, then the debug API key should be used. If it's not, use the release API key. There isn't a magic way to toggle back and forth between these API keys. It's a matter of literally changing the value in the screen_map.xml file to either "point" to the debug or release keys (as needed, depending on how your manifest is setup). That's a long way to say, you're almost there! You'll get this and next time it'll be much easier. Still frustrates me every time!
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
10/31/12 02:15 AM (13 years ago)
Hi David, I generated a release keystore using the Keytool plugin. Got my Google maps API key, plugged it into strings.xml and set android:debuggable="false", cleaned and rebuilt my app and running it on my usb attached phone. Still displays grid only. Any help appreciated Cheers
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/31/12 02:31 AM (13 years ago)
There appears to be one step you may have missed. In the res > layout.xml you you need to change the line Android:apiKey="@string/googleMapsAPIKeyDebug"  Change Debug at the end to Release. Save; compile and run
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
10/31/12 09:20 AM (13 years ago)
Sorry Guys, still no go :( I must be missing something really simple but I have followed all your instructions to the letter. Don't worry I'm not giving up lol I'm gonna beat this thing ! Here is a snippet from LogCat if it helps any: 10-31 23:57:00.385: W/ZZ(25061): BT_screen_menuListSimple:handleItemTap loads screen with itemId: "5896AC45B1E0B30251537DB" 10-31 23:57:00.385: W/ZZ(25061): BT_application:getScreenDataByItemId 5896AC45B1E0B30251537DB 10-31 23:57:00.385: W/ZZ(25061): BT_application:getScreenDataByItemId screenType is BT_screen_map for screen with nickname: Location 10-31 23:57:00.385: W/ZZ(25061): BT_act_controller:loadScreenObject for screen with nickname "Location" and type "BT_screen_map" 10-31 23:57:00.435: W/ZZ(25061): BT_screen_map:onCreate 10-31 23:57:00.440: W/ZZ(25061): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "Location" 10-31 23:57:00.440: W/ZZ(25061): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#FFFFFF" 10-31 23:57:00.440: W/ZZ(25061): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "Location" 10-31 23:57:00.450: W/ZZ(25061): BT_screen_map:onStart using data from app's configuration file 10-31 23:57:00.450: W/ZZ(25061): BT_screen_map:parseScreenData 10-31 23:57:00.455: W/ZZ(25061): BT_screen_map:showMapPins 10-31 23:57:00.455: W/ZZ(25061): BT_screen_map:showMapPins Here are some snippets from the manifest: <!-- recommneded device features --> <uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.location" android:required="true"/> <uses-feature android:name="android.hardware.location.gps" android:required="true"/> <uses-feature android:name="android.hardware.telephony" android:required="true"/> <application android:name="mccuskeralzheimers_appDelegate" android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false" android:theme="@android:style/Theme.NoTitleBar"> <!-- THE NEXT LINE IS ONLY USED IF MAPS ARE USED --> <uses-library android:name="com.google.android.maps"/> <activity android:name=".Screen_LocationMap" android:label="@string/app_name" android:screenOrientation="sensor"></activity> Here is a snippet from screen_map.xml: <com.google.android.maps.MapView android:id="@+id/mapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="@string/googleMapsAPIKeyRelease" android:clickable="true"/> I am using Google APIs (Android 2.2) and I have my phone connected via USB. I clean build and Run via "Run Configurations". My Eclipse version is Juno sr1 and I'm running Win7. I get both pin locations that I have set up in the BT control panel as well as a phone icon for my device. The Directions button fires up Google Maps and gives the recommended route. All is good except for the damn grid ! Cheers, Carlos
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/31/12 11:16 AM (13 years ago)
This might sound like a dumb question but it appears you have it set correctly so the only other thing i can think is that the maps key is in the wrong place. Double check the key is the correct release key for fingerprint (just in case you generated more than one. There are two places for maps keys (one fir debuggable and one for release. If its in the wrong one it won'tw work Failing that I can't think of any other reason.
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 08:12 AM (13 years ago)
Still no success :( Almost at the point of giving up lol
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
11/02/12 10:17 AM (13 years ago)
Was able to solve my problem with the help of Mad Padge. Basically I had to export the apk and email it to myself and install it. I would still like to know how to do it thru Ecipse. Anywyas, thanks to all you guys here too !! See this thread: https://www.buzztouch.com/forum/thread.php?tid=B81C7903DB51B9CD581535F&fid=0B19EC7C02CBDD92F12FD08&sortColumn=FT.id&sortUpDown=DESC&currentPage=1
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
11/02/12 10:48 AM (13 years ago)
Ah Total forgot you were running via usb. think you can only ten emulator and usb using debug. Anyhows glad you got it working.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
11/06/12 08:37 PM (13 years ago)
When I tap directions I am getting the error: "No location found. Your device does not appear to be reporting its location." I downloaded the fresh version of the map plugin and uploaded it to my server, re-downloaded the package, and copied in the new version of BT_screen_map into my existing project. I am still getting the error. This is what the line 593 shows: "Uri uri = Uri.parse("http://maps.google.com/maps?saddr=" + tmpLatitude + "," + tmpLongitude + "&daddr=" + tappedLocation.getLatitude() + "," + tappedLocation.getLongitude());" The line right above it has a warning on "tappedLocation: "BT_item tappedLocation = (BT_item) childItems.get(selectedIndex);" Any ideas on how I can fix this? Thank you!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/06/12 08:51 PM (13 years ago)
Hi Susan, You're right! The bt hosted version of the map plugin was different than the self hosted version. I just updated the download server (used for the self hosted plugins) so they both match. Hate to say it, but, you'll need to re-do exactly what you described above - reinstall the plugin in your self hosted panel with the latest version I just uploaded. Bet the warnings go away :-) Background: There are two different scenarios going on in our backend. One process that manages all the plugins created using the plugin tool, "the new ones" and one that manages all the existing ones, "the old ones." We're slowing getting all of these off the old process and onto the new process so this doesn't keep happening. This as in conflicts between the bt hosted version and the self hosted versions. Sigh...time time time will cure all :-)
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
11/06/12 09:10 PM (13 years ago)
Just glad I have a solution! Yeah!
 

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.