Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps Android API v2 works only on one phone
    primarykey
    data
    text
    <p>I'm working with my team on getting Google Maps to display using their Android API v2.</p> <p>I managed to get the codes up and tested on <strong>my own phone and it works perfectly</strong>... however when the codes run on my <strong>teammates' phones</strong>, their screens are grey, and they have this:</p> <pre><code>E/Google Maps Android API(30514): Authorization failure. </code></pre> <p>The weird thing is, this error doesn't appear in their logcat 100%, sometimes they just get the grey screen without any errors. Our codes are sychronized with SVN by the way so they are definitely updated.</p> <p>My <strong>API key is obtained from the debugging key</strong>, and has been verified to be correct since it runs perfectly on my phone.</p> <p>I'm not sure what exactly is causing this and thus I'm not sure what codes I can post here to seek help. In the meantime I'm going to post my MapFragment class codes and hope it sheds some light for someone to help.</p> <p>Please let me know if there's anything else I can post up here to seek an answer and I'll post it asap. Thanks!</p> <pre><code>public class POnlineMapViewFragment extends SherlockMapFragment { private GoogleMap mMap; private double latitude; private double longitude; private String placeName; static Bundle bundle; private LatLng point; View v; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); bundle = getArguments(); if(bundle != null) { this.latitude = getArguments().getDouble("latitude"); this.longitude = getArguments().getDouble("longitude"); this.placeName = getArguments().getString("placeName"); this.point = new LatLng(latitude,longitude); } } @Override public View onCreateView(LayoutInflater inflator, ViewGroup container, Bundle savedInstanceState) { View v = super.onCreateView(inflator, container, savedInstanceState); mMap = getMap(); CameraUpdate center= CameraUpdateFactory.newLatLng(point); CameraUpdate zoom=CameraUpdateFactory.zoomTo(17); mMap.addMarker(new MarkerOptions().position(point).title(placeName).icon(BitmapDescriptorFactory.fromResource(R.drawable.gps_small))); mMap.moveCamera(center); mMap.animateCamera(zoom); return v; } public static POnlineMapViewFragment newInstance(Bundle b) { POnlineMapViewFragment mapfrag = new POnlineMapViewFragment(); mapfrag.setArguments(b); return mapfrag; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload