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

@kartikbhalla/react-native-truecaller

v0.1.12

Published

react native sdk integration of truecaller for both android and ios

Downloads

21

Readme

@kartikbhalla/react-native-truecaller

Truecaller Integration with React Native for both Android[SDK v3.0.0] and IOS[SDK v0.1.8]

Installation

npm install @kartikbhalla/react-native-truecaller

Configuration

Android

  • Generate client-id using Truecaller Android Guide

  • Add the following tag to your AndroidManifest.xml file:

    <meta-data 
        android:name="com.truecaller.android.sdk.ClientId"
        android:value="YOUR_CLIENT_ID"
    />

iOS

  • Generate AppKey using Truecaller IOS Guide

  • Add the entry truesdk under LSApplicationQueriesSchemes in into your Info.plist file

    <key>LSApplicationQueriesSchemes</key>
    <array>
    <string>truesdk</string>
    </array>
  • Add the associated domain provided by Truecaller in Your project -> Capabilities > Associated Domains. The prefix 'applinks:' is needed for universal links to function properly. Note that there is no http:// or https:// prefix when setting up the applinks:

Associated domains

  • Starting with SDK version 0.1.7, It is mandatory to register urlScheme in your project, in the below format: truecallersdk-YOUR_APP_KEY.

URL objects

Usage

  • Install pods to the project

    pod install
  • Import the package using

    import { useTruecaller, TRUECALLER_ANDROID_CUSTOMIZATIONS } from '@kartikbhalla/react-native-truecaller';
  • Use the truecaller hook

    const { initializeTruecaller, openTruecallerModal, user, isTruecallerSupported } = useTruecaller({
        iosAppKey: 'YOUR_IOS_APP_KEY',
        iosAppLink: 'YOUR_IOS_APP_LINK',
        androidButtonColor: '#FF0000',
        androidButtonStyle: TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_STYLES.ROUND,
        androidButtonText: TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_TEXTS.CONTINUE,
        androidButtonTextColor: '#FFFFFF',
        androidClientId: 'YOUR_ANDROID_CLIENT_ID',
        androidConsentHeading: TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.LOG_IN_TO,
        androidFooterButtonText: TRUECALLER_ANDROID_CUSTOMIZATIONS.FOOTER_BUTTON_TEXTS.SKIP,
    });
  • Initialize trucaller using

    useEffect(() => {
        initializeTruecaller();
    }, []);
  • You can verify if the truecaller is supported using

    const isSupported = isTruecallerSupported();
  • Open truecaller modal using

    openTruecallerModal();
  • Once submitted, the data will be available in the user object.

    console.log(user);

Customizations

Android supports customizations available in Android Truecaller SDK Customizations. To customize these, you can use the following constants available inside TRUECALLER_ANDROID_CUSTOMIZATIONS

Android Button Texts

TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_TEXTS.CONTINUE
TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_TEXTS.ACCEPT
TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_TEXTS.CONFIRM
TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_TEXTS.PROCEED

Android Button Styles

TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_STYLES.ROUND
TRUECALLER_ANDROID_CUSTOMIZATIONS.BUTTON_STYLES.RECTANGLE

Android Footer Button Texts

TRUECALLER_ANDROID_CUSTOMIZATIONS.FOOTER_BUTTON_TEXTS.SKIP
TRUECALLER_ANDROID_CUSTOMIZATIONS.FOOTER_BUTTON_TEXTS.ANOTHER_MOBILE_NUMBER
TRUECALLER_ANDROID_CUSTOMIZATIONS.FOOTER_BUTTON_TEXTS.ANOTHER_METHOD
TRUECALLER_ANDROID_CUSTOMIZATIONS.FOOTER_BUTTON_TEXTS.MANUALLY
TRUECALLER_ANDROID_CUSTOMIZATIONS.FOOTER_BUTTON_TEXTS.LATER

Android Consent Heading Texts

TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.LOG_IN_TO
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.SIGN_UP_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.SIGN_IN_TO
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.VERIFY_NUMBER_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.REGISTER_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.GET_STARTED_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.PROCEED_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.VERIFY_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.VERIFY_PROFILE_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.VERIFY_YOUR_PROFILE_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.VERIFY_PHONE_NO_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.VERIFY_YOUR_NO_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.CONTINUE_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.COMPLETE_ORDER_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.PLACE_ORDER_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.COMPLETE_BOOKING_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.CHECKOUT_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.MANAGE_DETAILS_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.MANAGE_YOUR_DETAILS_WITH
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.LOGIN_TO_WITH_ONE_TAP
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.SUBSCRIBE_TO
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.GET_UPDATES_FROM
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.CONTINUE_READING_ON
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.GET_NEW_UPDATES_FROM
TRUECALLER_ANDROID_CUSTOMIZATIONS.CONSENT_HEADING_TEXTS.LOGIN_SIGNUP_WITH

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT