Google Map v2 with SupportMapFragment not working properly when exporting Android application -


i have activity using google map v2. use extension of supportmapfragment. when deploying on device(galaxy tab 2) in usb debug mode works perfectly, when trying export signed application package(.apk) , install on same device map displayed empty. no exception thrown.

in manifest file have following permissions set:

<permission android:name="my.example.app.permission.maps_receive"     android:protectionlevel="signature">  <uses-permission android:name="my.example.app.permission.maps_receive"> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices"> 

here code of extension of supportmapfragment:

public class mysupportmapfragment extends supportmapfragment{  private mapviewcreatedlistener mapviewcreatedlistener;  public void setmapviewcreatedlistener(mapviewcreatedlistener mapviewcreatedlistener){   this.mapviewcreatedlistener=mapviewcreatedlistener; }   // callback results(is used add behavior map in main activity,e.g. map click listener)  public abstract static class mapviewcreatedlistener {   public abstract void onmapcreated();  }   @override  public view oncreateview (layoutinflater inflater, viewgroup container, bundle           savedinstancestate) {    view view = super.oncreateview(inflater, container, savedinstancestate);                  //notify view has been created   if( mapviewcreatedlistener != null ) {    mapviewcreatedlistener.onmapcreated();              }   return view;  }   } 

the problem caused using wrong api key(generated sha1 of debug certificate). worked after using new 1 generated key pair used signing application.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -