Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
smartech-cordova
Advanced tools
Follow the installing instructions for android
Follow the installing instructions for ios
$ cordova plugin add smartech-cordova
In order to identify a user, set unique user identity by adding given snippet as per the requirement.
Smartech.setIdentity(<unique_user_identity>,function(response){
//Your code here
}, function(error){
});
In order to wipe out user identity from the SDK, add given snippet as per the requirement.
Smartech.clearIdentity(function(response){
//Your code here
}, function(error){
});
To capture login activity of the user, add given snippet inside the js file of your project when the user gets logged in successfully.
Smartech.login(<unique_user_identity>,function(response){
//Your code here
}, function(error){
});
To capture logout activity of the user, add given snippet inside the js file when the user gets logged out successfully.
Smartech.logout(function(response){
//Your code here
}, function(error){
});
Smartech.clearIdentity(function(response){
//Your code here
}, function(error){
});
Note: Avoid calling clearIdentity() method if one wants to track user activity even if user has logged out of the application.
To capture custom activity performed by the user, add given snippet as per the requirement.
Smartech.track(<event_name>, payload,function(response){
//Your code here
}, function(error){
});
E.g.
const payload = {
name: 'Galaxy',
description: '20gram bars',
id: '1'
};
Smartech.track("Add To Cart",payloadData,function(response){
//Your code here
}, function(error){
});
To capture and map user attributes, add given snippet as per the requirement.
Smartech.profile(<profile_object>,function(response){
//Your code here
}, function(error){
});
E.g.
const payload = {
NAME: "User Name",
EMAILID: "abc@xyz.com",
AGE: "30",
MOBILE: "4545748"
};
Smartech.profile(payloadData,function(response){
//Your code here
}, function(error){
});
Note: Use attribute name in capital letters as shown above.
To fetch delivered push notifications, add given snippet as per the requirement.
Smartech.getNotifications(<count>,function(response){
//Your code here
}, function(error){
});
Note: The method returns a JSONArray of delivered push notifications for the user.
If the end user wants to opt out of being tracked, add given snippet as per the requirement.
Smartech.optOut(<boolean_flag>,function(response){
//Your code here
}, function(error){
});
Note: The method accepts a boolean value.
If an end user wants to opt out, the flag should be passed as true. Once the user opts out, SDK will not be able to track that particular user further and no communications will be received by that user.
If an end user wants to opt in, the flag should be passed as false. Once the user opts in, SDK will be able to track that particular user further and next communications will be received by that user.
In order to track user location and pass it further to Smartech, add given snippet as per the requirement.
Smartech.setUserLocation(<double_lat>, <double_long>,function(response){
//Your code here
}, function(error){/*Handle error here */}
);
Note: The method mentioned above accepts 3 parameters including context, latitude & longitude. Data type of ‘latitude’ & ‘longitude’ should compulsorily be 'floating value'. In case if any parameter is null, SDK will not be able to persist user location.
To obtain GUID of the user from the SDK, add given snippet as per the requirement.
Smartech.getGUID(function(response){
//Your code here
}, function(error){
});
To obtain the FCM token of the user from the SDK, add given snippet as per the requirement.
Smartech.getPushToken(function(response){
//Your code here
}, function(error){
});
Add following listeners to your Javascript:
document.addEventListener('onDeepLink', this.onDeepLink, false);// optional, register to receive deep links.
document.addEventListener('onCustomPayload', this.onCustomPayload, false); // optional, register to receive CustomPayload.
Smartech.addObserverForDeeplinkAndCustomPayload();
// deep link handling
onDeepLink: function(e) {
console.log(e.deeplink);
},
//CustomPayload handling
onCustomPayload: function(e) {
console.log(onCustomPayload);
},
FAQs
Smartech Plugin for Cordova/PhoneGap/Ionic
The npm package smartech-cordova receives a total of 0 weekly downloads. As such, smartech-cordova popularity was classified as not popular.
We found that smartech-cordova demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.