Advanced
Here are some advanced features which you can set up based on your requirement.
Get FCM Token
To obtain the FCM token of the user from the SDK, add given snippet as per the requirement.
Smartech.getInstance(new WeakReference<>(context)).getDevicePushToken();
Smartech.getInstance(WeakReference(context)).getDevicePushToken()
SmartechSDK.getDevicePushToken((error, devicePushToken) => {
//Grab the devicePushToken
});
Fetching Existing token from FCM
To obtain an already generated token by Application, we can use the below method to get the existing token.
Smartech.getInstance(new WeakReference<>(context)).fetchAlreadyGeneratedTokenFromFCM();
Smartech.getInstance(WeakReference(context)).fetchAlreadyGeneratedTokenFromFCM()
SmartechSDK.fetchAlreadyGeneratedTokenFromFCM()
Get GUID
To get the GUID which is used by CEE SDK to identify the user, you can call the getGUID()
method.
String guid = Smartech.getInstance(new WeakReference<>(context)).getDeviceUniqueId();
val guid=Smartech.getInstance(WeakReference(context)).getDeviceUniqueId()
SmartechSDK.getDeviceGuid((error, deviceGuid) => {
//Grab the deviceGuid
});
Debugging
To check the logs of CEE SDK, you need to implement a method named setDebugLevel(). By default, debug level will be None.
Below is the Log levels.
LOG_LEVEL_VERBOSE
LOG_LEVEL_DEBUG
LOG_LEVEL_INFO
LOG_LEVEL_WARN
LOG_LEVEL_ERROR
LOG_LEVEL_FATAL
LOG_LEVEL_NONE
Smartech smartech = Smartech.getInstance(new WeakReference<>(this.getApplicationContext()));
smartech.setDebugLevel(SMTDebugLevel.Level.VERBOSE);
val smartech = Smartech.getInstance(WeakReference(this.getApplicationContext()))
smartech.setDebugLevel(SMTDebugLevel.Level.LOG_LEVEL_DEBUG)
Updated 3 months ago
Next
You can go back to setup other features or choose one of them from the left panel!