title: How to use SMS verification code by sending otp?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>package com.surbhi.smsappacme;
  
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.util.Log;
  import android.widget.Toast;
  
  import com.digits.sdk.android.AuthCallback;
  import com.digits.sdk.android.Digits;
  import com.digits.sdk.android.DigitsAuthButton;
  import com.digits.sdk.android.DigitsException;
  import com.digits.sdk.android.DigitsSession;
  import com.twitter.sdk.android.core.TwitterAuthConfig;
  import com.twitter.sdk.android.core.TwitterCore;
  
  import io.fabric.sdk.android.Fabric;
  
  public class MainActivity extends AppCompatActivity {
      String TWITTER_KEY="LmrOrmpo6DuXmOG8EZxxa4tvpyJoJ";
      String TWITTER_SECRET="9P33l4tRaFwDR7FG05Nvffi9Z4JQ2zUiSnTXsgWGcK6c646Z9wZMu";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
          Fabric.with(this, new TwitterCore(authConfig), new Digits.Builder().build());
          Digits.Builder digitsBuilder = new Digits.Builder().withTheme(R.style.CustomDigitsTheme);
  //        Fabric.with(this, new TwitterCore(authConfig), digitsBuilder.build());
          setContentView(R.layout.activity_main);
          DigitsAuthButton digitsButton = (DigitsAuthButton) findViewById(R.id.auth_button);
          digitsButton.setCallback(new AuthCallback() {
              @Override
              public void success(DigitsSession session, String phoneNumber) {
                  // TODO: associate the session userID with your user model
                  Toast.makeText(getApplicationContext(), "Authentication successful for "
                          + phoneNumber, Toast.LENGTH_LONG).show();
              }
  
              @Override
              public void failure(DigitsException exception) {
                  Log.d("Digits", "Sign in with Digits failure", exception);
              }
          });
  
      }
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  repositories {
      maven { url 'https://maven.fabric.io/public' }
  }
  android {
      compileSdkVersion 24
      buildToolsVersion "24.0.2"
  
      defaultConfig {
          applicationId "com.surbhi.smsappacme"
          minSdkVersion 15
          targetSdkVersion 24
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:24.2.0'
      compile('com.digits.sdk.android:digits:2.0.0@aar') {
          transitive = true;
      }
  }
   </code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.surbhi.smsappacme"&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
              &lt;meta-data
                  android:name="io.fabric.ApiKey"
                  android:value="LmrOrmpo6DuXmOG8EZtvpyJoJ"
                  /&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          jcenter()
                  maven { url 'https://maven.fabric.io/public' }
  
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.3'
          classpath 'io.fabric.tools:gradle:1.+'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.surbhi.smsappacme.MainActivity"&gt;
  
      &lt;com.digits.sdk.android.DigitsAuthButton
          android:id="@+id/auth_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/RelativeLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have four fields in my registration screen (username,email,password,mobile number) and I want to send a n <code>OTP</code> to the user for verification purpose. Is there any easy way to implement this by using a single <code>API</code>.</p>