Commit a234bb0e by Krishna Vemulawada

disabled otp

parents 5156da6a 84dff289
...@@ -31,7 +31,8 @@ public class OtpApiManager { ...@@ -31,7 +31,8 @@ public class OtpApiManager {
OtpPostData otpPostData = new OtpPostData(); OtpPostData otpPostData = new OtpPostData();
otpPostData.setPhone_number(mobileNumber); otpPostData.setPhone_number(mobileNumber);
otpPostData.setVia("sms"); otpPostData.setVia("sms");
otpPostData.setCountry_code("+91"); otpPostData.setCountry_code(Constants.TWILIO_COUNTRY_CODE);
otpPostData.setLn("en"); otpPostData.setLn("en");
Call<ResponseBody> call = retrofit.create(OtpApi.class).getOtp(otpPostData); Call<ResponseBody> call = retrofit.create(OtpApi.class).getOtp(otpPostData);
...@@ -98,7 +99,8 @@ public class OtpApiManager { ...@@ -98,7 +99,8 @@ public class OtpApiManager {
final Retrofit retrofit = RestClient.getInitializedRestAdapterWithOutAuthorizationHeader(); final Retrofit retrofit = RestClient.getInitializedRestAdapterWithOutAuthorizationHeader();
Call<ResponseBody> call = retrofit.create(OtpApi.class).validateOtp(mobileNumber,"+91",verificationCode,"en"); Call<ResponseBody> call = retrofit.create(OtpApi.class).validateOtp(mobileNumber,Constants.TWILIO_COUNTRY_CODE,verificationCode,"en");
try { try {
//Retrofit synchronous call //Retrofit synchronous call
......
...@@ -198,7 +198,7 @@ public class ADALActivity extends AppCompatActivity { ...@@ -198,7 +198,7 @@ public class ADALActivity extends AppCompatActivity {
public void handleMessage(Message msg) { public void handleMessage(Message msg) {
if( sIntSignInInvoked.compareAndSet(false, true)) { if( sIntSignInInvoked.compareAndSet(false, true)) {
if (msg.what == MSG_INTERACTIVE_SIGN_IN_PROMPT_AUTO){ if (msg.what == MSG_INTERACTIVE_SIGN_IN_PROMPT_AUTO){
mAuthContext.acquireToken(getActivity(), RESOURCE_ID, CLIENT_ID, REDIRECT_URI, PromptBehavior.Auto, getAuthInteractiveCallback()); mAuthContext.acquireToken(getActivity(), RESOURCE_ID, CLIENT_ID, REDIRECT_URI, PromptBehavior.Always, getAuthInteractiveCallback());
}else if(msg.what == MSG_INTERACTIVE_SIGN_IN_PROMPT_ALWAYS){ }else if(msg.what == MSG_INTERACTIVE_SIGN_IN_PROMPT_ALWAYS){
mAuthContext.acquireToken(getActivity(), RESOURCE_ID, CLIENT_ID, REDIRECT_URI, PromptBehavior.Always, getAuthInteractiveCallback()); mAuthContext.acquireToken(getActivity(), RESOURCE_ID, CLIENT_ID, REDIRECT_URI, PromptBehavior.Always, getAuthInteractiveCallback());
} }
......
...@@ -81,13 +81,14 @@ public class OtpValidationActivity extends Activity { ...@@ -81,13 +81,14 @@ public class OtpValidationActivity extends Activity {
ButterKnife.bind(this); ButterKnife.bind(this);
mApplication = (CatalogueApplication) getApplication(); mApplication = (CatalogueApplication) getApplication();
new LoginDetailsSendToServer().execute();
} }
@OnClick(R.id.otp_screen_text_view) @OnClick(R.id.otp_screen_text_view)
void onLoginClicked() { void onLoginClicked() {
// callOtpAPI(); // callOtpAPI();
new LoginDetailsSendToServer().execute();
} }
@OnClick(R.id.otp_screen_validate_text_view) @OnClick(R.id.otp_screen_validate_text_view)
......
...@@ -11,6 +11,7 @@ import com.vsoft.vera.api.interfaces.PendingApprovalsApi; ...@@ -11,6 +11,7 @@ import com.vsoft.vera.api.interfaces.PendingApprovalsApi;
public class Constants { public class Constants {
public static final String TAG = AppConfig.APP_INTERNAL_NAME; public static final String TAG = AppConfig.APP_INTERNAL_NAME;
public static final String TWILIO_COUNTRY_CODE = "+91";
public static final String[] month = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; public static final String[] month = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
/** /**
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/phone_validate_layout" android:id="@+id/phone_validate_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="match_parent"> android:layout_height="match_parent">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment