chandumunna / Ionic-3-phone-number-verification-using-digits

Mobile number verification code. i have customize digits plugin for get mobile number after successfully verify.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

This README would normally document whatever steps are necessary to get your application up and running.

Ionic and Cordova Installation

$ sudo npm install -g ionic cordova

Create New project

$ ionic start MobileNumberVerify

Add platform

Add Ios and android platform in project

$ ionic cordova platform add android
$ ionic cordova platform add ios

Demo View

alt text

Add cordova-plugin-digits plugin

#!cli

$ ionic cordova plugin add cordova-plugin-digits --variable FABRIC_API_KEY=XXXXXXXXXXXXXX --variable FABRIC_CONSUMER_KEY=XXXXXXXXXXXXXX --variable FABRIC_CONSUMER_SECRET=XXXXXXXXXXXXXX --save

Get Fabric api key from fabric.io/dashboard

Customise plugin for getting verify phoneNumber

ANDROID

  • REMOVE ANDROID PLATFORM

    ionic platform rm android

  • OPEN CordovaDigits.java file

    goto plugins->cordova-plugin-digits->src->android->FabricPlugin.java

  • CHANGE CODE

    add following line of code inside authenticate() method after authHeaders object.(Approx 72 line number)

     authHeaders.put("phoneNumber", phoneNumber);
    

    then you get verify contact number

IOS

Nothing change in ios

About

Mobile number verification code. i have customize digits plugin for get mobile number after successfully verify.


Languages

Language:C++ 45.3%Language:Objective-C 36.7%Language:Java 9.7%Language:C# 4.4%Language:JavaScript 1.9%Language:HTML 0.6%Language:CSS 0.6%Language:TypeScript 0.5%Language:C 0.3%