Discussion Forums  >  Maps, Device Location, Tracking

Replies: 15    Views: 202

Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
11/25/13 02:06 PM (10 years ago)

Map problem (GoogleApiV2 + BTv3)

Hi i make a simple apk just to test the map option.. i have obtained a google map api key V2 (i follow the how-to from the section of the forum) 1) i save my project to V3 2) i open it in my Eclipse 3) i remove the ''google play services remove jar'' from the libs file and i get 70 errors 4) i went to the project properties and add the google play services and Android api level 14 (it was selected already) then the errors corrected 5) i open ''AndroidManifest.xml'' and edit '<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="GOOGLE_MAPS_FOR_ANDROID_V2_API_KEY_GOES_HERE"/>' and replace the 'GOOGLE_MAPS_FOR_ANDROID_V2_API_KEY_GOES_HERE' with my obtained Api Key 6) after i save the manifest.xml i get 3 warnings - <uses-sdk> tag should specify a target API level (the highest verified version; when running on later versions, compatibility behaviors may be enabled) with android:targetSdkVersion="?" - Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one - Should explicitly set android:allowBackup to true or false (it's true by default, and that can have some security implications for the application's data) 7) i start to export my project with the right Key_store that obtained the Google map Key and the warnings disappear after i finish the apk and install it to my device maps doesnt work here is what i am getting http://i30.photobucket.com/albums/c316/caslor_1978/diafora/2013-11-25-22-46-07_zpsdba5e59b.jpg http://i30.photobucket.com/albums/c316/caslor_1978/diafora/2013-11-25-22-46-17_zps235b968c.jpg what is my mistake ?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/25/13 05:25 PM (10 years ago)
The first image (59b) shows the screen when it cannot find the plugin it's looking for. You might also want to change your API to Android API v11 and see if that helps. Cheers! -- Smug (Changing the API won't bring the plugin back; that's a side suggestion)
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
11/26/13 12:56 AM (10 years ago)
No unfortunately when i change from properties android api level 14 to 11 i get lot of errors in the project http://i30.photobucket.com/albums/c316/caslor_1978/diafora/errorandroidapi11_zpsb38e6465.jpg
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
11/26/13 10:00 AM (10 years ago)
Anyone else with the same problem?
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
11/26/13 12:06 PM (10 years ago)
i went to properties and place android Api level 11 and get this error Description Resource Path Location Type The method setHomeButtonEnabled(boolean) is undefined for the type ActionBar BT_activity_host.java /aircooledvw/src/com/aircooledvw line 370 Java Problem how can i solve that in order to compile the project and test to see if the map works this time
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
11/26/13 12:42 PM (10 years ago)
Here is the log file (my android device connected to the eclypse) when i am going to the map menu of my application 11-26 21:35:27.062: W/ZZ(24130): BT_screen_menuButtons:button clicked 11-26 21:35:27.062: W/ZZ(24130): BT_screen_menuButtons:handleItemTap loads screen with itemId: "26681B28E3CD6182E257A43" 11-26 21:35:27.062: W/ZZ(24130): BT_application:getScreenDataByItemId itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.062: W/ZZ(24130): BT_screen_menuButtons:loadScreenObject. Loading screen with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.062: W/ZZ(24130): BT_activity_host:initPluginWithScreenData. Calling helper method in BT_application 11-26 21:35:27.062: W/ZZ(24130): BT_application:initPluginWithScreenData. Creating plugin with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.062: W/ZZ(24130): BT_screen_map:setScreenData JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.062: W/ZZ(24130): BT_activity_host:showFragmentForPlugin. Showing plugin with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.062: W/ZZ(24130): BT_activity_host:configureNavBarAndBackgroundForScreen Calling helper methods in BT_viewUtilities... 11-26 21:35:27.082: W/ZZ(24130): BT_viewUtilities:updateBackgroundColorsForScreen. Screen with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.082: W/ZZ(24130): BT_viewUtilities:updateBackgroundImageForScreen. Screen with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.112: W/ZZ(24130): BT_screen_menuButtons:onPause JSON itemId: "4E822D3FF2690BEBD729939" itemType: "BT_screen_menuButtons" itemNickname: "Διαφορα" 11-26 21:35:27.112: W/ZZ(24130): BT_screen_menuButtons:onStop JSON itemId: "4E822D3FF2690BEBD729939" itemType: "BT_screen_menuButtons" itemNickname: "Διαφορα" 11-26 21:35:27.122: W/ZZ(24130): BT_screen_map:onAttach JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.122: W/ZZ(24130): BT_screen_map:onCreateOptionsMenu JSON itemId: "26681B28E3CD6182E257A43" 11-26 21:35:27.122: W/ZZ(24130): BT_screen_map:onCreateOptionsMenu JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.132: W/ZZ(24130): BT_screen_map:onCreate JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.132: W/ZZ(24130): BT_screen_map:onCreateView JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.142: W/ZZ(24130): BT_screen_map:onCreate. Found Google Maps v2 API Key: AxxxxxxxxxxIdn_jyK_VgvxxxxxxxxxxDRYAd7Q 11-26 21:35:27.142: W/ZZ(24130): BT_screen_map:onCreateView EXCEPTION (1) java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 11-26 21:35:27.142: W/ZZ(24130): BT_screen_map:onActivityCreated JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.142: W/ZZ(24130): BT_activity_host:configureNavBarAndBackgroundForScreen Calling helper methods in BT_viewUtilities... 11-26 21:35:27.152: W/ZZ(24130): BT_viewUtilities:updateBackgroundColorsForScreen. Screen with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.152: W/ZZ(24130): BT_viewUtilities:updateBackgroundImageForScreen. Screen with JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.152: W/ZZ(24130): BT_screen_map:onStart JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.152: W/ZZ(24130): BT_screen_map:onResume JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map" 11-26 21:35:27.152: W/ZZ(24130): BT_screen_map:onCreateOptionsMenu JSON itemId: "26681B28E3CD6182E257A43" 11-26 21:35:27.152: W/ZZ(24130): BT_screen_map:onCreateOptionsMenu JSON itemId: "26681B28E3CD6182E257A43" itemType: "BT_screen_map" itemNickname: "ioatha map"
 
Qlabs Ron
I hate code!
Profile
Posts: 16
Reg: Nov 19, 2013
London
1,510
like
11/30/13 01:07 PM (10 years ago)
Did you solve your issue ? I am getting pretty much the same thing.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/30/13 02:13 PM (10 years ago)
I was mistaken; it should be Android API 14. Cheers! -- Smug
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
12/01/13 03:18 AM (10 years ago)
i try again today.. i check that all plugins were checked when i saved my BTv3 project but still cant make the maps to work (among some atheres problems i am getting with v3) :( also i get this message as i say before ''there was a problem creating a google map. in most cases this erros occurs because the android project was configued properly to run google maps'' as i have read until now the only thing that we have to do when we have google Api v2 and BTv3 , is to place the key in the manifest.xml where says that should be placed... am i wrong? or have to change lot of others like i have seen that was needed in older versions...
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/01/13 04:27 AM (10 years ago)
I'll have to check. To be honest, I use offline maps with my android for the moment, and haven't really messed with the google maps since v2.2 I'm sort of busy with some things, and may not get to it for a few days, but I will get to it. Perhaps someone else can assist, but if they don't, I'll be back. Cheers! -- Smug
 
Qlabs Ron
I hate code!
Profile
Posts: 16
Reg: Nov 19, 2013
London
1,510
like
12/01/13 05:50 PM (10 years ago)
Is offline maps an android plugin ?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/01/13 07:40 PM (10 years ago)
No, at least not yet. I've created tutorials for how to do it in iOS, but they probably need an update now that we've moved to iOS 5. Still, most of the concepts should apply. They'll just look a little different in your development environment. Android, for once, is actually easier than iOS with respect to offline maps. But again, I haven't created a tutorial, nor have I created a 'public' plugin for it yet. I may do the plugin. I'll certainly do the tutorial. But not today; I'm swamped for the next couple of weeks minimum. Cheers! -- Smug
 
usy
Lost but trying
Profile
Posts: 8
Reg: Oct 12, 2012
Los Angeles
980
like
12/09/13 12:21 AM (10 years ago)
Any updates to this thread? I'm having the exact same issue and steps and it is extremely frustrating. Can't use the old android version because I can't get a key and the new one isn't working either :(
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
12/15/13 06:28 PM (10 years ago)
With the right Key, I had to add this line. Just as shown "<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />" I put it here in my manifest. almost at the bottom, right above the final application closing. <!-- BT_activity_host runs after startup and after splash screen (splash screens are not required --> <activity android:name=".BT_activity_host" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@style/hostThemeWithTitle" android:uiOptions="splitActionBarWhenNarrow"></activity> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> </application>
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/16/13 01:19 AM (10 years ago)
Nicely done, Patrick! Cheers! -- Smug
 
Moestress
Android Fan
Profile
Posts: 91
Reg: Feb 12, 2012
Lynwood
4,110
like
02/23/14 12:45 PM (10 years ago)
@Patrickmotox, sweet stuff! It works with the new API2! Thanks so much!
 

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.