The City Docs
7.2
7.2
  • Welcome
  • ADMIN PANEL
    • Import Project
    • Structure
    • Notification
    • MySQL Database
    • Add New Category
    • News Info
    • Custom Color
    • Change Log
  • ANDROID
    • Getting Started
      • Installation
      • Import Project
    • Structure
    • REST API
      • Configure API Url
      • Validate Your Web
    • Category
      • Integration
      • Add New
    • Firebase [must]
    • Ads
    • Maps & Analytics
    • Sort By Distance
    • Lazy Load
    • SQLite Database
    • Custom Color
    • Change Log
Powered by GitBook
On this page
  • GOOGLE MAPS
  • FIREBASE ANALYTICS
  1. ANDROID

Maps & Analytics

PreviousAdsNextSort By Distance

Last updated 2 years ago

GOOGLE MAPS

This android project used Google map feature, So you must change API_KEY by yours.

1. You can use GOOGLE_API_KEY from GCM (you can see at previous menu), and by Enable this list API :

Google Cloud Messaging
Google Maps Android API 
Google Maps Directions API  
Google Maps Distance Matrix API 
Google Maps Geocoding API
Google Maps Geolocation API
Google Maps JavaScript API
Google Maps Roads API
Google Places API for Android
Google Places API Web Service

2. Or you can use others API key # After you get the API_KEY you can placed you API key at android project res/values/strings.xml

<!-- API KEY FOR MAP -->
<string name="api_key">AIzaSyBiB9CCaRZLfRP4bMZc.........</string>

For ActivityMaps.java you need to change zooming location with your own city latitute longitude.

You can change at Constant.java

public static final double city_lat = -6.9174639;
public static final double city_lng = 107.6191228;

FIREBASE ANALYTICS

On version 6.6 we use firebase anlytics, and the integration included section Firebase [must]

Track custom screen view, event, and exception, you only need to call this method if you want to track, at file data/ThisApplication.java

public void trackScreenView(String screenName) {
   . . .
 }
 
 public void trackException(Exception e) {
   . . .    
 }
 
 public void trackEvent(String category, String action, String label) {
   . . .
 }

Example Call - at AcitivityRecipeDetails.java we call track event to detect what user view :

 // analytics tracking
 ThisApplication.getInstance().trackScreenView("View place : "+place.name);

[ read this ]
http://blog.dream-space.web.id/?p=89