Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
35ad6637
authored
Oct 14, 2019
by
Krishna Vemulawada
Browse files
Options
_('Browse Files')
Download
Plain Diff
mail added for sysid
parents
420ba7ac
f70f4a8b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
7 deletions
app/build.gradle
app/src/main/java/com/vsoft/vera/ui/ADALActivity.java
app/src/main/java/com/vsoft/vera/ui/OtpValidationActivity.java
app/src/main/java/com/vsoft/vera/utils/Constants.java
app/src/main/res/layout/activity_otp_validation.xml
app/src/main/res/values/strings.xml
app/vportal/debug/app-vportal-debug.apk
app/build.gradle
View file @
35ad6637
...
@@ -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
"
}
}
}
}
}
}
...
...
app/src/main/java/com/vsoft/vera/ui/ADALActivity.java
View file @
35ad6637
...
@@ -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,6 +172,8 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -169,6 +172,8 @@ public class ADALActivity extends AppCompatActivity {
}
}
});
});
getCountryCode
();
// CheckLoginValues();
// 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
);
...
@@ -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"
;
}
}
}
}
app/src/main/java/com/vsoft/vera/ui/OtpValidationActivity.java
View file @
35ad6637
This diff is collapsed.
Click to expand it.
app/src/main/java/com/vsoft/vera/utils/Constants.java
View file @
35ad6637
...
@@ -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"
};
/**
/**
...
...
app/src/main/res/layout/activity_otp_validation.xml
View file @
35ad6637
...
@@ -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"
/>
...
...
app/src/main/res/values/strings.xml
View file @
35ad6637
...
@@ -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>
...
...
app/vportal/debug/app-vportal-debug.apk
deleted
100644 → 0
View file @
420ba7ac
The file could not be displayed because it is too large.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment