How to get The MapsDemo Working

PhilipOGormanPhilipOGorman USMember ✭✭✭

https://developer.xamarin.com/samples/monodroid/MapsDemo/

Ok - I've downloaded the sample, generated the API key and enabled the API. Ive updated my manifest to the following:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="ca.jcaelectronics.MapsDemo"> <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" /> <application android:label="JcaMapsDemo"> <!-- Put your Google Maps V2 API Key here. --> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="MY__KEY" /> <!-- <meta-data android:name="com.google.android.gms.version" android:value="@integer/22" />--> </application> <permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="JcaMapsDemo.permission.MAPS_RECEIVE"/> <!-- We need to be able to download map tiles and access Google Play Services--> <uses-permission android:name="android.permission.INTERNET" /> <!-- Allow the application to access Google web-based services. --> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <!-- Google Maps for Android v2 will cache map tiles on external storage --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- These are optional, but recommended. They will allow Maps to use the My Location provider. --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> </manifest>

I then run the app on Samsung Android 4.4.2 device and I see an empty grid.
I think there are severl steps missing from the guide
What do I do next?

1) I notice that the sample app has a target of 2.2 (API Level 8), should I change this as I'm running on 4.4.2?
2) Do I need to add the Google Play Component to the project? and add this line to the manifest:?

<meta-data android:name="com.google.android.gms.version" android:value="@integer/22" />
3) My Samsung Android 4.4.2 device has google maps installed and it works do I need to check for anything else?
4) I have installed everything available in the Android SDK manager - is there anything else I missed?

Any suggestions?
Thanks,
Philip

Posts

Sign In or Register to comment.