Android Mapv2 Issue - android

All,
Trying to use google v2 map api in my android application and can't get it to work, it keeps displaying a blank white page!
I even tried running samples from https://github.com/commonsguy/cw-omnibus/tree/master/MapsV2 and got the BasicMap application compiled and installed on my device but exactly same issue!
Since this is happening both for my code and this code that all I heard is a valid source I assume this is not the Key issue as these two use two different keys.
I've done all I could, here is manifest file from the sample:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.commonsware.android.mapsv2.basic"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16"/>
<permission
android:name="com.commonsware.android.mapsv2.basic.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.SET_DEBUG_APP" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock.Light.DarkActionBar">
<uses-library android:name="com.google.android.maps" />
<activity
android:name="MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyC4iyT46cB00IdKGcy5EmAxK5uCOQX2Oy8"/>
<activity android:name="LegalNoticesActivity">
</activity>
</application>
</manifest>
Any idea what this could be?

Try to follow the following guide I wrote for adding a Google Map Api V2:
Google Map API V2
and please share you logcat stack trace with us so we could understand more clearly what is your problem.

Related

Run Only Google Maps Android API v2 3

I know this topics already have posted. But I am not success for this work.I can not run google map v2 in emulator. Now I am trying BlueStack. When I run BlueStack then it show Get Google Play Service. What I do please tell me.How I can run google map v2 successfully.
My AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gmapdemon"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="MY_KEYandroid"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"
/>
<activity
android:name="com.example.gmapdemon.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Create an emulator from genymotion that supports google map api. You can look this up.
Find a download for the app store that will run on your emulator. I found mine here: http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2... I was using the 4.2.2 version.
Drag and drop that into your emulator. I am using google nexus.
Say ok to the prompts.
Once everything is installed close down the emulator and restart.
sign up with a good account.
Voilà

GCM Notifications are ignored on the device

I'm trying to do some GCM notifications on Android. I've come as far as having something happen on the device.
NotificationService is throwing the following exception:
12-11 16:02:19.650 202-380/? E/NotificationService﹕ Ignoring notification with icon==0: Notification(contentView=org.***.**.reciever/0x1090098 vibrate=null,sound=null,defaults=0x0,flags=0x0)
Here is my manifest for reference:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.***.**.reciever"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<permission android:name="org.***.**.reciever.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>
<uses-permission android:name="org.***.**.reciever.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/***"
android:name=".***Application" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="org.***.**.reciever.MapActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="util.GcmBroadcastReciever"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.***.**.reciever" />
</intent-filter>
</receiver>
<service android:name="util.GcmIntentService" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="***"/>
</application>
All the *. are just the masked package name, they are all the same.
Any idea what I'm doing wrong?
Also, is the notification supposed to pop up on the device without any extra code or does the app have to ask the OS to show a notification on the screen when the GCM push arrives? I think i read something about Android doing this part differently from iOS.
Figured it out, it's not the actual push message that's causing the issue as i thought. So i was barking up the wrong tree for a couple hours.
It turns out it was the actual notification that had an issue because it was demo code from Google >.<
Replaced with proper code -> working.
Thanks for your time!

My Android App shows the google map in debug but doesn't show it when released to the market

I have an app that I have created that uses the Google Maps and Google Playstore and in debug using Eclipse and the Android SDK the map shows up on the device I am running but when released it doesn't show up on the app. Theres just a big grey screen.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eema"
android:versionCode="5"
android:versionName="5" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<permission
android:name="com.eema.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.eema" />
<uses-permission android:name="com.eema.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--
The following two permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<activity
android:name="com.eema.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.eema.MapViewActivity"
android:label="#string/title_activity_map_view" >
</activity>
<activity
android:name="com.eema.NoConnectionActivity"
android:label="#string/title_activity_no_connection" >
</activity>
<activity
android:name="com.eema.ShelterActivity"
android:label="#string/title_activity_shelter" >
</activity>
<activity
android:name="com.eema.FuelStopActivity"
android:label="#string/title_activity_fuel_stop" >
</activity>
<activity
android:name="com.eema.DirectionsActivity"
android:label="#string/title_activity_directions" >
</activity>
<activity
android:name="com.eema.EvacRouteTableActivity"
android:label="#string/title_activity_evac_route_table" >
</activity>
</application>
</manifest>
Could it be the Keystore. I have a release keystore file that was generated do I need to get the keystore from that if so how?
Are you just seeing gray screen then... it's almost definitely the API key that is wrong. The Emulator uses the debug keystore, with androiddebugkey, so you should create an API key for that. Remember to change it when you publish the app to the market
refer this
When U make your apk file. U need create a keystore. Now, using that keystore to get MD5 using "Keytool", like you did with debug keystore. After that, U need to register API key from MD5, you just got. And late, U use API key in your android manifest.
I assume it is a keystore problem.
Get the SHA1 from the keystore using the "keytool"
And register it like you did with the debug keystore.
And you are good to go.

Google Map Api v2 without map view

I have followed this tutorial and I taked this ... without any error in Logcat view,If you have any idea about this error.
Thanks
I post to you my manifest code :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.maps"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.maps.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Add Api key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyAmklok-bwsgXzYLyBl4jLxFY3Gs6198YA" />
</application>
<!-- add Permisson -->
<permission
android:name="com.example.maps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.maps.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- autres configs -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
</manifest>
All steps in many tutorials have a same code , I Think a problem is in emulator .
Google Map Api v2 wont show the map if you try to run it in Emulator or Device.
In order to show Map you need to sign the Application and then through command prompt try to install your application. Hope you will be able to get Map.
Few Steps required:-
1) You need add Libray project to your application
adt-bundle-windows-x86_64-20130219\adt-bundle-windows-x86_64-20130219\sdk\extras\google\google_play_services\libproject
Hope this will help you.
From the tutorial i read from this http://agusharyanto.net/wordpress/?p=893 from indonesia, you must use the google service library on the Google API that you choose and use another application venton.apk and gms.apk from adb command. If you dont understand the languages, try understand by look at the image explanation.

Why apk isn't compatible from Google Play for Gigabyte GSmart G1345

The AndroidManifest except for Activities is:
<manifest android:installLocation="auto"
android:versionCode="1"
android:versionName="1.1"
package="..."
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="8"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<application android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:name=".MyApp"
android:theme="#style/app_theme">
<uses-library android:name="com.google.android.maps"
android:required="true"/>
<activity android:label="#string/app_name"
android:name=".general.StartActivity"
android:noHistory="true"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
...
In the developer console, turn off the option Copy Protection. For me it's working, Acer Iconita Tab a500, stupidly did not app on market, and the link from browser says "is not compatible". Google Support advised to disable copy protection (this option doesn't shows app for rooted devices).

Categories

Resources