How can i make it work the Maps Demo of xamarin on Google’s API 10 (2.3.3)?, im trying to run the maps demo app with the google maps api that Monodroid provides and it doesnt work, it always appear Java.IO.Exception: 27, Java.IO.Exception: 28, and so on. Im trying to work with that since December and i dont see any solution of that. Im working on Mac with Monodevelop IDE. Does anyone have a solution?
Edit:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.maps.MapView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0oqo66omATbRfB2Wpsdf6Kpi9-fm88CsqwHauLg"
/>
Here is my permission on the Manifest:
<?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="cdcsoftwareerpmobileandroid.cdcsoftwareerpmobileandroid">
<application android:label="CdcSoftware.ErpMobile.AndroidUI" android:debuggable="true">
</application>
<uses-permission android:name="android.permission.CALL_PHONE">
</uses-permission>
<uses-permission android:name="android.permission.INTERNET">
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION">
</uses-permission>
<uses-sdk /></manifest>
And this is the MapActivity Class which i commented a line to test both options:
public class MapAddress : MapActivity
{
const String TAG = "MapViewCompassDemo";
private SensorManager sensor_manager;
private RotateView rotate_view;
private MyLocationOverlay location_overlay;
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
//SetContentView (Resource.Layout.mapview);
// Get a reference to the sensor manager
sensor_manager = (SensorManager) GetSystemService (Context.SensorService);
// Create our view
var map_view = new MapView (this, "0oqo66dsfTbRfB2Wp0Lr6Kpi9-fm88CsqwHauLg");
rotate_view = new RotateView (this);
rotate_view.AddView (map_view);
SetContentView (rotate_view);
// Create the location overlay
location_overlay = new MyLocationOverlay (this, map_view);
location_overlay.RunOnFirstFix (delegate {
map_view.Controller.AnimateTo (location_overlay.MyLocation);
});
map_view.Overlays.Add (location_overlay);
map_view.Controller.SetZoom(18);
map_view.Clickable = true;
map_view.Enabled = true;
}
protected override bool IsRouteDisplayed {
get { return false; }
}
}
Note: The Api Key there is not the real one.
I realize that my problem was my apiKey, i got my fingerprint from another directory: ~/.android/debug.keystore and i didnt think that was the problem, because i generate with it in order to obtain my apikey and i use it in my Java android app and was working fine, but then i try change it to the debug.store that is located in this directory: $HOME/.local/share/Xamarin/Mono for Android/debug.keystore, and throws me another fingerprint, so i use it to generate another apikey, and then magically works my app on Mono. But thank you very much for your help