
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
cordova-play-install-referrer
Advanced tools
Supported platforms: | ![]() |
Current version: | 1.0.1 |
Troubles? | Report an issue |
cordova-play-install-referrer is a simple wrapper around Google's Play Install Referrer Library which offers basic functionality of obtaining Android referrer information from Cordova app.
More information about Play Install Referrer API can be found in official Google documentation.
Version of native Play Install Referrer Library which is being used inside of latest cordova-play-install-referrer plugin version is 2.1.
cordova-play-install-referrer plugin is hosted on npm repo and can be added from there.
cordova plugin add cordova-play-install-referrer
In order to obtain install referrer details, call getInstallReferrerInfo static method of PlayInstallReferrer class:
PlayInstallReferrer.getInstallReferrerInfo(function(installReferrerInfo) {
if (!installReferrerInfo.errorMessage) {
console.log("install referrer = " + installReferrerInfo.installReferrer);
console.log("referrer click timestamp seconds = " + installReferrerInfo.referrerClickTimestampSeconds);
console.log("install begin timestamp seconds = " + installReferrerInfo.installBeginTimestampSeconds);
console.log("referrer click timestamp server seconds = " + installReferrerInfo.referrerClickTimestampServerSeconds);
console.log("install begin timestamp seconds = " + installReferrerInfo.installBeginTimestampServerSeconds);
console.log("install version = " + installReferrerInfo.installVersion);
console.log("google play instant = " + installReferrerInfo.googlePlayInstant);
} else {
console.log("error message: " + installReferrerInfo.errorMessage);
console.log("error response code: " + installReferrerInfo.errorResponseCode);
}
});
If successfully obtained, map with content of install referrer information will be delivered into callback method. From that map, you can get following install referrer details:
Remaining two fields are indicators of error which might have occurred. If error happened, error message is guaranteed that it will be available, so you should first check if error message is null or not before trying to read above mentioned fields. Remaining error related fields are:
In case error is reported, you can get following information about the error:
OK
will never be reported in this property, since it's a success status code). Note: Error code field is not always present in error map - only if error created when one of the error codes from native Install Referrer Library is received; otherwise this field will be undefined.Important thing to notice is that in order to work properly, Play Install Referrer Library requires following permission to be added to your app's AndroidManifest.xml
:
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
Play Install Referrer Library is added to cordova-play-install-referrer plugin as an Gradle dependency and it will automatically make sure that manifest file ends up with above mentioned permission added to it upon building your app.
FAQs
Play Install Referrer wrapper for Cordova
We found that cordova-play-install-referrer 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.