Tag: google-maps

Google maps api v2 – The type android.app.Fragment cannot be resolved. It is indirectly referenced from required .class files

I’ve found a few questions on this subject here but their answers do not seem to apply being that my project is referencing the library that contains the class. Here’s my code: package com.demo.app; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v4.view.ViewPager; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.SupportMapFragment; import […]

Hide markers info window in android google maps API v2

Currently I was able to view all my markers in Google maps using Android Google maps API v2. Adding my marker in map: mapView.addMarker (new MarkerOptions() .position(aUsersLocation). icon(BitmapDescriptorFactory.fromBitmap(aUserImage)) .snippet(My_VALUE_1) .title(My_VALUE_2) .hideInfoWindow(); I have several markers and assigned few values (My_VALUE_1 and My_VALUE_2) to each marker’s snippet and title. When user clicks a marker, I need […]

MarkerClick works but InfoWindowClick does not open ViewModel

The following MarkerClick implementation works, perfectly fine. I could able to open other View via ShowViewModel View.cs mMap.MarkerClick += MMap_MarkerClick; private void MMap_MarkerClick(object sender, GoogleMap.MarkerClickEventArgs e) { ViewModel.MapInfoSelected(e.Marker.Title); } ViewModel.cs public void MapInfoSelected(string name) { ShowViewModel<StudentViewModel>(new { studentName = name}); } InfoWindowClick does not trigger to open other View. View.cs mMap.InfoWindowClick += MMap_InfoWindowClick; private void […]

Is READ_GSERVICES permission still required for Google Maps?

To add Google Maps to your android application, you need to include a few permissions: <!– Required –> <uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE” /> <uses-permission android:name=”android.permission.INTERNET” /> <uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE” /> <uses-permission android:name=”com.google.android.providers.gsf.permission.READ_GSERVICES”/> <!– Optional –> <uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION”/> <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”/> However, by checking Google Maps Android API v2 documentation again, I noticed that com.google.android.providers.gsf.permission.READ_GSERVICES is no longer required. I […]

Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza

Could not find class ‘android.app.AppOpsManager’, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. In the Google Developer Console (https://console.developers.google.com) Ensure that the “Google Maps Android API v2” is enabled. Ensure that the following Android Key exists: API Key: Android Application (;): FD:9E:49:CD:63:;com.xxx.xxx

How get marker position before dragging?

In Google Maps API v2, I want to store the previous location before dragging a marker, however, when I begin dragging the marker, it will always jump to some upper location, so in callback onMarkerDragStart, I can’t get the last position. Is it a bug, or can any fix the problem?

Android: Finding nearby places with Google Places API

I am trying to get list of the nearby places using Google Places API. I have enabled requried API from Google Devloper Console and have an valid API key. I am able to get my corrent location. After I got the my current location I am trying to get nearby places list but it returns […]

Google map v2 Custom Infowindow with two clickable buttons or ImageView

I need custom info window with two clickable button as above.In it when more then marker and click any one of them then window should be open and when click on another marker another window should open and close previous window as well in single click. is there any specific reason why google map v2 […]

Calculate true heading correctly in android

My requirement is bearing in like Google maps apps in compass mode (you can see demo when click to current location button twice): In this compass mode, the Maps always rotated by an angle so that bluedot arrow always point to the top screen. But I don’t know how to calculate correct the bearing from […]

Create Overlay ImageView Animation Google Map

I am trying to make my overlay image to do following things: onClick / onDrag of map , show a constant image at the middle of map which is a pin onTouchUp , change marker image to Loading marker and once data loading complete change loading image to new image with text. Here is a […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.