Commit 35ad6637 by Krishna Vemulawada

mail added for sysid

parents 420ba7ac f70f4a8b
...@@ -72,7 +72,7 @@ android { ...@@ -72,7 +72,7 @@ android {
vportal { vportal {
applicationId "com.vsoft.vera.vportal" applicationId "com.vsoft.vera.vportal"
versionCode 1 versionCode 1
versionName "0.1.8" versionName "1.1.0"
} }
} }
} }
......
...@@ -15,8 +15,10 @@ import android.os.Handler; ...@@ -15,8 +15,10 @@ import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.os.Message; import android.os.Message;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.content.LocalBroadcastManager; import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.telephony.TelephonyManager;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
...@@ -72,6 +74,7 @@ import org.json.JSONObject; ...@@ -72,6 +74,7 @@ import org.json.JSONObject;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
...@@ -169,7 +172,9 @@ public class ADALActivity extends AppCompatActivity { ...@@ -169,7 +172,9 @@ public class ADALActivity extends AppCompatActivity {
} }
}); });
// CheckLoginValues(); getCountryCode();
// CheckLoginValues();
callGraphButton = (Button) findViewById(R.id.callGraph); callGraphButton = (Button) findViewById(R.id.callGraph);
signOutButton = (Button) findViewById(R.id.clearCache); signOutButton = (Button) findViewById(R.id.clearCache);
login_with_otp = (Button) findViewById(R.id.login_with_otp); login_with_otp = (Button) findViewById(R.id.login_with_otp);
...@@ -189,7 +194,6 @@ public class ADALActivity extends AppCompatActivity { ...@@ -189,7 +194,6 @@ public class ADALActivity extends AppCompatActivity {
}); });
login_with_otp.setOnClickListener(new View.OnClickListener() { login_with_otp.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) { public void onClick(View v) {
// onSignOutClicked(); // onSignOutClicked();
...@@ -804,4 +808,28 @@ public class ADALActivity extends AppCompatActivity { ...@@ -804,4 +808,28 @@ public class ADALActivity extends AppCompatActivity {
} }
} }
} }
/*
* getCountryCode - To get the Country mobile code dynamically.
*
* @return void
* */
public void getCountryCode() {
try {
TelephonyManager telephonyManager =
(TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null) {
String countryName = telephonyManager.getNetworkCountryIso();
if(countryName.equalsIgnoreCase("us")) {
Constants.TWILIO_COUNTRY_CODE = "+1";
}
if(countryName.equalsIgnoreCase("in")) {
Constants.TWILIO_COUNTRY_CODE = "+91";
}
}
} catch (Exception e) {
Constants.TWILIO_COUNTRY_CODE = "+1";
}
}
} }
...@@ -11,7 +11,7 @@ import com.vsoft.vera.api.interfaces.PendingApprovalsApi; ...@@ -11,7 +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 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"};
/** /**
......
...@@ -59,9 +59,10 @@ ...@@ -59,9 +59,10 @@
android:layout_marginLeft="@dimen/extra_large_margin" android:layout_marginLeft="@dimen/extra_large_margin"
android:layout_marginRight="@dimen/extra_large_margin" android:layout_marginRight="@dimen/extra_large_margin"
android:background="@drawable/username_under_bg_box" android:background="@drawable/username_under_bg_box"
android:hint="Please enter mobile number" android:hint="@string/phone_number"
android:lines="1" android:lines="1"
android:inputType="number" android:maxLength="20"
android:inputType="phone"
android:padding="@dimen/normal_margin" android:padding="@dimen/normal_margin"
android:singleLine="true" /> android:singleLine="true" />
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
...@@ -109,6 +110,7 @@ ...@@ -109,6 +110,7 @@
android:background="@drawable/username_under_bg_box" android:background="@drawable/username_under_bg_box"
android:hint="@string/enter_otp" android:hint="@string/enter_otp"
android:lines="1" android:lines="1"
android:maxLength="8"
android:inputType="number" android:inputType="number"
android:padding="@dimen/normal_margin" android:padding="@dimen/normal_margin"
android:singleLine="true" /> android:singleLine="true" />
......
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
<string name="user_error">Please enter username</string> <string name="user_error">Please enter username</string>
<string name="pasw_error">Please enter password</string> <string name="pasw_error">Please enter password</string>
<string name="phone_error">Please enter mobile number</string> <string name="phone_number">Please enter mobile number</string>
<string name="phone_no_error">Please enter valid mobile number</string>
<string name="otp_error">Please enter OTP</string> <string name="otp_error">Please enter OTP</string>
<string name="username_string">Username</string> <string name="username_string">Username</string>
<string name="password_string">Password</string> <string name="password_string">Password</string>
...@@ -144,7 +145,7 @@ ...@@ -144,7 +145,7 @@
<!-- messages --> <!-- messages -->
<string name="message_welcome">Chat with VERA</string> <string name="message_welcome">Chat with VERA</string>
<string name="reset_password">RESET PASSWORD</string> <string name="reset_password">RESET PASSWORD</string>
<string name="view_all_str"><u>View ALL</u></string> <string name="view_all_str"><u>View all</u></string>
<!--Speech Recognizer--> <!--Speech Recognizer-->
<string name="ds_listening">Listening…</string> <string name="ds_listening">Listening…</string>
......
The file could not be displayed because it is too large.
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