Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Map view shows only grey screen with zoom button
    primarykey
    data
    text
    <p>I am Using android Google map API-2 for my application. When clicking map view it shows only a screen with zoom button.</p> <p>my AndroidManifest.xml file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.burusoth.advertise" android:versionCode="1" android:versionName="1.0" &gt; &lt;permission android:name="com.burusoth.advertise.permission.MAPS_RECEIVE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.burusoth.advertise.permission.MAPS_RECEIVE" /&gt; &lt;uses-permission android:name="android.permission.CALL_PHONE" &gt; &lt;/uses-permission&gt; &lt;uses-permission android:name="android.permission.INTERNET" &gt; &lt;/uses-permission&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt; &lt;!-- Required to show current location --&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; &lt;uses-sdk android:minSdkVersion="11" android:targetSdkVersion="17" /&gt; &lt;!-- Required OpenGL ES 2.0. for Maps V2 --&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name="com.burusoth.advertise.MainActivity" android:label="@string/app_name" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name="com.burusoth.advertise.View_Advertisements" android:label="@string/title_activity_view__advertisements" &gt; &lt;/activity&gt; &lt;activity android:name="com.burusoth.advertise.Gadget_view" android:label="@string/title_activity_gadget_view" android:windowSoftInputMode="stateHidden" &gt; &lt;/activity&gt; &lt;activity android:name="com.burusoth.advertise.Activity_post_advertisements" android:label="@string/title_activity_activity_post_advertisements" &gt; &lt;/activity&gt; &lt;activity android:name="com.burusoth.advertise.Post_Advertisement" android:label="@string/title_activity_post__advertisement" &gt; &lt;/activity&gt; &lt;activity android:name="com.burusoth.advertise.Popup" android:label="@string/title_activity_popup" &gt; &lt;/activity&gt; &lt;activity android:name="com.burusoth.advertise.Google_Map" android:label="@string/title_activity_google__map" &gt; &lt;/activity&gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyAKCvpyR3v4YStDJDoibNgoblkdch0F254" /&gt; &lt;/application&gt; </code></pre> <p></p> <pre><code>my activity xml file &lt;RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".Google_Map" &gt; &lt;fragment android:id="@+id/map" android:name="com.google.android.gms.maps.MapFragment" android:layout_width="match_parent" android:layout_height="match_parent"/&gt; &lt;/RelativeLayout&gt; </code></pre> <p>my Activity .java Activity file for calling map public class Google_Map extends Activity {</p> <pre><code>private GoogleMap googleMap=null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_google__map); try { // Loading map initilizeMap(); } catch (Exception e) { e.printStackTrace(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_google__map, menu); return true; } private void initilizeMap() { if (googleMap == null) { googleMap =((MapFragment)getFragmentManager().findFragmentById(R.id.map)).getMap(); // check if map is created successfully or not if (googleMap == null) { Toast.makeText(getApplicationContext(), "Sorry! unable to create maps", Toast.LENGTH_SHORT) .show(); } } } @Override protected void onResume() { super.onResume(); initilizeMap(); } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
    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