npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-truecaller

v1.0.3

Published

Cordova plugin for authentication with truecaller

Downloads

8

Readme


title: Truecaller Authentication description: Authenticate users with Truecaller.

cordova-plugin-truecaller

Supported Platforms

  • Android

Generate Fingerprint/SHA1 On Linux

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

On Windows

keytool -list -v -keystore "c:\users\your_user_name\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 

You can get the fingerprint/SHA1 from the command output

Generate partnerkey

  • Visit https://developer.truecaller.com/, create an account and login.
  • Navigate to your dashboard and add application.
  • Add your app name, package name and your fingerprint to add the application.
  • Copy the generated App Key, which is the partner key.

Installation

cordova plugin add cordova-plugin-truecaller --variable PARTNER_KEY='<Your truecaller partnerkey>'

Alternatively, you can also install from git url

cordova plugin add https://github.com/Deepaksai1919/cordova-truecaller.git --variable PARTNER_KEY='<Your truecaller partnerkey>'

truecaller

truecaller.check(successCallback, errorCallback)

Can be used to find if the user has truecaller application installed on their device.

truecaller.verify(options, successCallback, errorCallback)

Displays the truecaller dialog to authenticate the user.

Example

var options = {
  consentMode: 'Bottomsheet',
  loginTextPrefix: 'To continue',
  loginTextSuffix: 'Please verify mobile no',
  ctaTextPrefix: 'Use',
  buttonShape: 'Rounded',
  footerType: 'Later',
  consentTitle: 'Verify',
  sdkOptions: 'With otp',
};
cordova.plugins.truecaller.check(
    function (success) {
      cordova.plugins.truecaller.verify(
        options,
        function (profile) {
          console.log('Got profile', profile);
        },
        function (error) {
          console.error(error);
        }
      );
    },
    function (error) {
      if (error === 'Not installed')
        console.error('Truecaller is not installed on user device.');
      else console.error(error);
    }
  );

options.consentMode : string

Kind: consentMode property of Options Default: Bottomsheet Alowed Values

| Value | Description | | --- | --- | | Bottomsheet | Displays a bottomsheet | | Fullscreen | Displays a fullscreen modal | | Popup | Displays a popup |

options.buttonColor : hex color code

Kind: buttonColor property of Options Default: #2979FF

options.buttonTextColor : hex color code

Kind: buttonTextColor property of Options Default: #FFFFFF

options.loginTextPrefix : string

Kind: loginTextPrefix property of Options Default: To continue Description: Will display the same value. Alowed Values

| Value | | --- | | To get started | | To continue | | To complete your order | | To checkout | | To proceed with your booking | | To continue with your booking | | To get details | | To view more | | To continue reading | | For new updates | | To get updates | | To subscribe | | To subscribe and get updates |

options.loginTextSuffix : string

Kind: loginTextSuffix property of Options Default: To continue Description: Will display the same value. Alowed Values

| Value | | --- | | Please verify mobile no | | Please login | | Please signup | | Please login signup | | Please register | | Please sign in |

options.ctaTextPrefix : string

Kind: ctaTextPrefix property of Options Default: Proceed with Description: Will display the same value. Alowed Values

| Value | | --- | | Use | | Continue with | | Proceed with |

options.buttonShape : string

Kind: buttonShape property of Options Default: Rounded Description: The shape of button. Alowed Values

| Value | | --- | | Rectangle | | Rounded |

options.footerType : string

Kind: footerType property of Options Default: Later Description: Will display the same value in footer. Alowed Values

| Value | | --- | | Later | | Manually | | Another method |

options.consentTitle : string

Kind: consentTitle property of Options Default: Verify Description: Will display the same value. Alowed Values

| Value | | --- | | Login | | Sign up | | Sign in | | Verify | | Register | | Get started |

options.sdkOptions : string

Kind: sdkOptions property of Options Default: With otp Alowed Values

| Value | | --- | | With otp | | Without otp |

truecaller.clearSdk()

Clears the trueScope.

Example

cordova.plugins.truecaller.clearSdk()