These docs are for v1.0. Click to read the latest docs for v2.0.

Location Tracking

Smartech SDK allows the user to track location using setUserLocation() method which takes context, Latitude and Longitude as parameters.

📘

NOTE:

Data type of Latitude and Longitude should be double.

Smartech.setUserLocation(LATITUDE_DOUBLE_VALUE,  LONGITUDE_DOUBLE_VALUE);

// Sample code for reference purpose only
Smartech.setUserLocation(19.0760, 72.8777);

Get GUID

To get the GUID that is used by Smartech SDK to identify the user, you can call the getGuid() method.

Smartech.getGuid(function(response){
		//Grab the response
	}, function(error){  
});

To Fetch Advertising Id

If an app wants to fetch Advertising Id of the device using Smartech SDK, follow the steps below.

Adding Dependency

implementation 'com.google.android.gms:play-services-ads:17.2.1'

Adding Meta tags

<meta-data
	android:name="com.google.android.gms.ads.APPLICATION_ID"
	android:value="YOUR_ADMOB_APP_ID"/>
    
<meta-data
	android:name="SMT_USE_AD_ID"
	android:value="1_OR_0_VALUE"/>

Note:

  1. To get "AdMob App ID" please refer this: https://developers.google.com/admob/android/quick-start
  2. This tag accepts either ‘0’ or ‘1’ as value. If an app wants Smartech SDK to fetch Advertising Id of the device, use ‘1’ as value otherwise use '0'.