Posts

Showing posts with the label android google maps

Android Google Maps V2 Tutorial

Image
Step: 1 ====== 1) Generate a Google Maps API Key using this URL. 1.1) To generate a debug SHA1 key for testing apps for development use below command in windows command prompt. keytool -list -v -keystore "C:\Users\pratap.kesaboyina\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 1.2) To generate a release SHA1 key for production usage( when releasing your app to google play store, debug key will not work. You need a release SHA1 Key) keytool -list -v -keystore "C:\AndroidFiles\AppKeyStore.jks" -alias "Your App Alias Name" 1.3) Go ahead and add Maps Api Key in the manifest file and also add Permissions in the manifest File. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.pratap.mapssample" > <uses-feature android:glEsVersion= "0x00020000" android:required= ...

Get Address using Reverse Geocoding and Showing Google Map V2 in Android

Get Address using Reverse Geocoding and ShowingGoogle Map V2 in Android ====================== GPSTracker .java ======================= public class GPSTracker extends Service implements LocationListener { private final Context mContext; // flag for GPS status boolean isGPSEnabled = false; // flag for network status boolean isNetworkEnabled = false; // flag for GPS status boolean canGetLocation = false; Location location; // location double latitude; // latitude double longitude; // longitude // The minimum distance to change Updates in meters private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters // The minimum time between updates in milliseconds private static final long MIN_TIME_BW_UPDATES = 1000 * 60 * 1; // 1 minute // Declaring a Location Manager protected LocationManager locationManager; public GPSTracker(Context context) { this.mContext = context; getLocation(); } public Location getLocation() { try { locationManager = (Loc...