add country code

parent 6c3966bf
Showing with 99 additions and 14 deletions
......@@ -72,7 +72,7 @@ android {
vportal {
applicationId "com.vsoft.vera.vportal"
versionCode 1
versionName "0.2.6"
versionName "0.2.9"
}
}
}
......

33.9 KB | W: | H:

33.9 KB | W: | H:

app/src/arrow/res/drawable/chatbot.png
app/src/arrow/res/drawable/chatbot.png
app/src/arrow/res/drawable/chatbot.png
app/src/arrow/res/drawable/chatbot.png
  • 2-up
  • Swipe
  • Onion skin

33.8 KB | W: | H:

33.8 KB | W: | H:

app/src/arrow/res/drawable/my_incidents.png
app/src/arrow/res/drawable/my_incidents.png
app/src/arrow/res/drawable/my_incidents.png
app/src/arrow/res/drawable/my_incidents.png
  • 2-up
  • Swipe
  • Onion skin

31.5 KB | W: | H:

31.5 KB | W: | H:

app/src/arrow/res/drawable/my_requests.png
app/src/arrow/res/drawable/my_requests.png
app/src/arrow/res/drawable/my_requests.png
app/src/arrow/res/drawable/my_requests.png
  • 2-up
  • Swipe
  • Onion skin

37.1 KB | W: | H:

37.1 KB | W: | H:

app/src/arrow/res/drawable/order_services.png
app/src/arrow/res/drawable/order_services.png
app/src/arrow/res/drawable/order_services.png
app/src/arrow/res/drawable/order_services.png
  • 2-up
  • Swipe
  • Onion skin

34.2 KB | W: | H:

34.2 KB | W: | H:

app/src/arrow/res/drawable/report_incident.png
app/src/arrow/res/drawable/report_incident.png
app/src/arrow/res/drawable/report_incident.png
app/src/arrow/res/drawable/report_incident.png
  • 2-up
  • Swipe
  • Onion skin

38.8 KB | W: | H:

38.8 KB | W: | H:

app/src/citrix/res/drawable-xxxhdpi/my_incidents.png
app/src/citrix/res/drawable-xxxhdpi/my_incidents.png
app/src/citrix/res/drawable-xxxhdpi/my_incidents.png
app/src/citrix/res/drawable-xxxhdpi/my_incidents.png
  • 2-up
  • Swipe
  • Onion skin

34.2 KB | W: | H:

34.2 KB | W: | H:

app/src/citrix/res/drawable-xxxhdpi/my_requests.png
app/src/citrix/res/drawable-xxxhdpi/my_requests.png
app/src/citrix/res/drawable-xxxhdpi/my_requests.png
app/src/citrix/res/drawable-xxxhdpi/my_requests.png
  • 2-up
  • Swipe
  • Onion skin

45.6 KB | W: | H:

45.6 KB | W: | H:

app/src/citrix/res/drawable-xxxhdpi/order_services.png
app/src/citrix/res/drawable-xxxhdpi/order_services.png
app/src/citrix/res/drawable-xxxhdpi/order_services.png
app/src/citrix/res/drawable-xxxhdpi/order_services.png
  • 2-up
  • Swipe
  • Onion skin

33.4 KB | W: | H:

33.4 KB | W: | H:

app/src/citrix/res/drawable-xxxhdpi/report_incident.png
app/src/citrix/res/drawable-xxxhdpi/report_incident.png
app/src/citrix/res/drawable-xxxhdpi/report_incident.png
app/src/citrix/res/drawable-xxxhdpi/report_incident.png
  • 2-up
  • Swipe
  • Onion skin

33.9 KB | W: | H:

33.9 KB | W: | H:

app/src/ge/res/drawable/chatbot.png
app/src/ge/res/drawable/chatbot.png
app/src/ge/res/drawable/chatbot.png
app/src/ge/res/drawable/chatbot.png
  • 2-up
  • Swipe
  • Onion skin

710 KB | W: | H:

710 KB | W: | H:

app/src/ge/res/drawable/home_background.png
app/src/ge/res/drawable/home_background.png
app/src/ge/res/drawable/home_background.png
app/src/ge/res/drawable/home_background.png
  • 2-up
  • Swipe
  • Onion skin

33.8 KB | W: | H:

33.8 KB | W: | H:

app/src/ge/res/drawable/my_incidents.png
app/src/ge/res/drawable/my_incidents.png
app/src/ge/res/drawable/my_incidents.png
app/src/ge/res/drawable/my_incidents.png
  • 2-up
  • Swipe
  • Onion skin

32.9 KB | W: | H:

32.9 KB | W: | H:

app/src/ge/res/drawable/my_notifications.png
app/src/ge/res/drawable/my_notifications.png
app/src/ge/res/drawable/my_notifications.png
app/src/ge/res/drawable/my_notifications.png
  • 2-up
  • Swipe
  • Onion skin

31.5 KB | W: | H:

31.5 KB | W: | H:

app/src/ge/res/drawable/my_requests.png
app/src/ge/res/drawable/my_requests.png
app/src/ge/res/drawable/my_requests.png
app/src/ge/res/drawable/my_requests.png
  • 2-up
  • Swipe
  • Onion skin

37.1 KB | W: | H:

37.1 KB | W: | H:

app/src/ge/res/drawable/order_services.png
app/src/ge/res/drawable/order_services.png
app/src/ge/res/drawable/order_services.png
app/src/ge/res/drawable/order_services.png
  • 2-up
  • Swipe
  • Onion skin

34.2 KB | W: | H:

34.2 KB | W: | H:

app/src/ge/res/drawable/report_incident.png
app/src/ge/res/drawable/report_incident.png
app/src/ge/res/drawable/report_incident.png
app/src/ge/res/drawable/report_incident.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -494,7 +494,7 @@ public class ChatMessageAdapter extends RecyclerView.Adapter<ChatMessageAdapter.
}
}else if(message.contains("Ok, here's the link to the live agent:")) {
}else if(message.contains("Ok, here's the link to the live agent :")) {
hr_text_layt.setVisibility(View.VISIBLE);
mHRMessageView.setVisibility(View.VISIBLE);
......
......@@ -25,13 +25,13 @@ public class OtpApiManager {
private static String error = "Something went Wrong";
public static void getOTP(String mobileNumber, PostOtpApiListener listener){
public static void getOTP(String mobileNumber, String countryCode,PostOtpApiListener listener){
final Retrofit retrofit = RestClient.getInitializedRestAdapterWithOutAuthorizationHeader();
OtpPostData otpPostData = new OtpPostData();
otpPostData.setPhone_number(mobileNumber);
otpPostData.setVia("sms");
otpPostData.setCountry_code(Constants.TWILIO_COUNTRY_CODE);
otpPostData.setCountry_code(countryCode);
otpPostData.setLn("en");
......@@ -94,12 +94,12 @@ public class OtpApiManager {
}
public static void validateOTP(String mobileNumber,String verificationCode, GetValidateOtpApiListener listener){
public static void validateOTP(String mobileNumber,String verificationCode,String countryCode, GetValidateOtpApiListener listener){
final Retrofit retrofit = RestClient.getInitializedRestAdapterWithOutAuthorizationHeader();
Call<ResponseBody> call = retrofit.create(OtpApi.class).validateOtp(mobileNumber,Constants.TWILIO_COUNTRY_CODE,verificationCode,"en");
Call<ResponseBody> call = retrofit.create(OtpApi.class).validateOtp(mobileNumber,countryCode,verificationCode,"en");
try {
......
......@@ -236,6 +236,7 @@ public class ADALActivity extends AppCompatActivity {
}
}
private void CheckLoginValues() {
String sysId = PrefManager.getSharedPref(ADALActivity.this, PrefManager.PREFERENCE_USER_SYS_ID);
if (!TextUtils.isEmpty(sysId)) {
......
......@@ -11,9 +11,12 @@ import android.support.annotation.Nullable;
import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.Toast;
import com.bumptech.glide.Glide;
......@@ -43,6 +46,7 @@ import com.vsoft.vera.utils.KeyboardUtil;
import com.vsoft.vera.utils.PrefManager;
import com.vsoft.vera.utils.Util;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
......@@ -65,6 +69,9 @@ public class OtpValidationActivity extends Activity {
private List<UserApiValues> mUserDetails;
private LinearLayout mainLayt;
String userFullName;
Spinner country_spinner;
String[] country = { "US", "CAN", "IND"};
String countryCode="+1";
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
......@@ -72,6 +79,7 @@ public class OtpValidationActivity extends Activity {
setContentView(R.layout.activity_otp_validation);
mainLayt = (LinearLayout) findViewById(R.id.activity_main_lyt);
country_spinner = findViewById(R.id.country_spinner);
Glide.with(this).load(R.drawable.fulton_bg).into(new SimpleTarget<Drawable>() {
@Override
public void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {
......@@ -84,7 +92,30 @@ public class OtpValidationActivity extends Activity {
ButterKnife.bind(this);
mApplication = (CatalogueApplication) getApplication();
// new LoginDetailsSendToServer().execute();
//Creating the ArrayAdapter instance having the country list
ArrayAdapter aa = new ArrayAdapter(this,android.R.layout.simple_spinner_item,country);
aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
//Setting the ArrayAdapter data on the Spinner
country_spinner.setAdapter(aa);
country_spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String selectedCountry = parent.getItemAtPosition(position).toString();
if(selectedCountry.equalsIgnoreCase("US")){
countryCode = "+1";
}else if(selectedCountry.equalsIgnoreCase("CAN")){
countryCode = "+1";
}else if(selectedCountry.equalsIgnoreCase("IND")){
countryCode = "+91";
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
@OnClick(R.id.otp_screen_text_view)
......@@ -106,7 +137,7 @@ public class OtpValidationActivity extends Activity {
} else if (!TextUtils.isEmpty(phoneString) && phoneString.length() >= 10 && phoneString.length() <=20) {
KeyboardUtil.hideKeyboard(OtpValidationActivity.this);
if (mApplication.isNetConnected()) {
new generateOtp().execute(phoneString);
new generateOtp().execute(phoneString,countryCode);
} else {
DialogUtils.showNoConnectionDialog(OtpValidationActivity.this);
}
......@@ -122,7 +153,7 @@ public class OtpValidationActivity extends Activity {
KeyboardUtil.hideKeyboard(OtpValidationActivity.this);
if (mApplication.isNetConnected()) {
new validateOtp().execute(phoneString, otpCode);
new validateOtp().execute(phoneString, otpCode,countryCode);
} else {
DialogUtils.showNoConnectionDialog(OtpValidationActivity.this);
}
......@@ -148,8 +179,9 @@ public class OtpValidationActivity extends Activity {
protected Integer doInBackground(String... params) {
String phoneString = params[0];
String countryCodeString = params[1];
OtpApiManager.getOTP(phoneString, new PostOtpApiListener() {
OtpApiManager.getOTP(phoneString,countryCodeString, new PostOtpApiListener() {
@Override
public void onDoneApiCall(String message) {
apiMessage = message;
......@@ -215,8 +247,9 @@ public class OtpValidationActivity extends Activity {
String phoneString = params[0];
String otpCode = params[1];
String countryCD = params[2];
OtpApiManager.validateOTP(phoneString, otpCode,new GetValidateOtpApiListener() {
OtpApiManager.validateOTP(phoneString, otpCode,countryCD,new GetValidateOtpApiListener() {
@Override
public void onDoneApiCall(String message) {
apiMessage = message;
......

56.8 KB | W: | H:

56.8 KB | W: | H:

app/src/main/res/drawable-mdpi/logo_splash.png
app/src/main/res/drawable-mdpi/logo_splash.png
app/src/main/res/drawable-mdpi/logo_splash.png
app/src/main/res/drawable-mdpi/logo_splash.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="3dp" />
<gradient
android:angle="90"
android:centerX="35%"
android:startColor="@android:color/transparent"
android:centerColor="@android:color/transparent"
android:endColor="@android:color/transparent"
android:type="linear" />
<stroke
android:width="1dp"
android:color="@color/button_bg" />
</shape>
\ No newline at end of file

2.21 KB | W: | H:

2.21 KB | W: | H:

app/src/main/res/drawable/home_icon_new.png
app/src/main/res/drawable/home_icon_new.png
app/src/main/res/drawable/home_icon_new.png
app/src/main/res/drawable/home_icon_new.png
  • 2-up
  • Swipe
  • Onion skin

5.84 KB | W: | H:

5.84 KB | W: | H:

app/src/main/res/drawable/ic_login_banner.jpg
app/src/main/res/drawable/ic_login_banner.jpg
app/src/main/res/drawable/ic_login_banner.jpg
app/src/main/res/drawable/ic_login_banner.jpg
  • 2-up
  • Swipe
  • Onion skin

2.89 KB | W: | H:

2.89 KB | W: | H:

app/src/main/res/drawable/logout_ic.png
app/src/main/res/drawable/logout_ic.png
app/src/main/res/drawable/logout_ic.png
app/src/main/res/drawable/logout_ic.png
  • 2-up
  • Swipe
  • Onion skin

22.9 KB | W: | H:

22.9 KB | W: | H:

app/src/main/res/drawable/my_incidents_new.png
app/src/main/res/drawable/my_incidents_new.png
app/src/main/res/drawable/my_incidents_new.png
app/src/main/res/drawable/my_incidents_new.png
  • 2-up
  • Swipe
  • Onion skin

26.6 KB | W: | H:

26.6 KB | W: | H:

app/src/main/res/drawable/my_requests_new.png
app/src/main/res/drawable/my_requests_new.png
app/src/main/res/drawable/my_requests_new.png
app/src/main/res/drawable/my_requests_new.png
  • 2-up
  • Swipe
  • Onion skin

33.5 KB | W: | H:

33.5 KB | W: | H:

app/src/main/res/drawable/order_services_new.png
app/src/main/res/drawable/order_services_new.png
app/src/main/res/drawable/order_services_new.png
app/src/main/res/drawable/order_services_new.png
  • 2-up
  • Swipe
  • Onion skin

23.9 KB | W: | H:

23.9 KB | W: | H:

app/src/main/res/drawable/report_incident_new.png
app/src/main/res/drawable/report_incident_new.png
app/src/main/res/drawable/report_incident_new.png
app/src/main/res/drawable/report_incident_new.png
  • 2-up
  • Swipe
  • Onion skin

25.2 KB | W: | H:

25.2 KB | W: | H:

app/src/main/res/drawable/reports_new.png
app/src/main/res/drawable/reports_new.png
app/src/main/res/drawable/reports_new.png
app/src/main/res/drawable/reports_new.png
  • 2-up
  • Swipe
  • Onion skin

21.9 KB | W: | H:

21.9 KB | W: | H:

app/src/main/res/drawable/vera_new.png
app/src/main/res/drawable/vera_new.png
app/src/main/res/drawable/vera_new.png
app/src/main/res/drawable/vera_new.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -44,25 +44,53 @@
android:visibility="visible"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/spinner_lyt"
android:layout_width="84dp"
android:layout_height="42dp"
android:layout_centerVertical="true"
android:layout_gravity="left"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp"
android:background="@drawable/logout_spinner_dropdown_bg"
android:orientation="vertical">
<Spinner
android:id="@+id/country_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:background="@android:color/transparent"
android:gravity="center"
android:popupBackground="#F0E2E2E2"
android:spinnerMode="dropdown"
android:textAlignment="center" />
</RelativeLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/phone_layout"
android:layout_width="match_parent"
android:layout_width="320dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:layout_centerVertical="true">
android:gravity="right">
<EditText
android:id="@+id/otp_screen_phone_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/extra_large_margin"
android:layout_marginRight="@dimen/extra_large_margin"
android:layout_marginBottom="@dimen/extra_large_margin"
android:background="@drawable/username_under_bg_box"
android:hint="@string/phone_number"
android:inputType="phone"
android:lines="1"
android:maxLength="20"
android:inputType="phone"
android:padding="@dimen/normal_margin"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
......
......@@ -24,7 +24,7 @@
<dimen name="small_margin">5dp</dimen>
<dimen name="normal_margin">10dp</dimen>
<dimen name="large_margin">15dp</dimen>
<dimen name="extra_large_margin">20dp</dimen>
<dimen name="extra_large_margin">10dp</dimen>
<!--Text size-->
<dimen name="ruquest_status_text_size">15sp</dimen>
......
......@@ -165,6 +165,13 @@
<item>Insufficient permissions</item>
</string-array>
<string-array name="country_arrays">
<item>US</item>
<item>IND</item>
<item>CAN</item>
</string-array>
<!--home Screen Option-->
<!--Start-->
<string name="home_screen_report_incident_title">Report Incident</string>
......

3.56 KB | W: | H:

3.56 KB | W: | H:

app/src/vportal/res/drawable/completed.png
app/src/vportal/res/drawable/completed.png
app/src/vportal/res/drawable/completed.png
app/src/vportal/res/drawable/completed.png
  • 2-up
  • Swipe
  • Onion skin

3.46 KB | W: | H:

3.46 KB | W: | H:

app/src/vportal/res/drawable/pending.png
app/src/vportal/res/drawable/pending.png
app/src/vportal/res/drawable/pending.png
app/src/vportal/res/drawable/pending.png
  • 2-up
  • Swipe
  • Onion skin

7.39 KB | W: | H:

7.39 KB | W: | H:

app/src/vportal/res/drawable/success_tooltip.png
app/src/vportal/res/drawable/success_tooltip.png
app/src/vportal/res/drawable/success_tooltip.png
app/src/vportal/res/drawable/success_tooltip.png
  • 2-up
  • Swipe
  • Onion skin

8.03 KB | W: | H:

8.03 KB | W: | H:

app/src/vportal/res/drawable/warning_tooltip.png
app/src/vportal/res/drawable/warning_tooltip.png
app/src/vportal/res/drawable/warning_tooltip.png
app/src/vportal/res/drawable/warning_tooltip.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed. Click to expand it.
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