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
493df8e0
authored
Oct 03, 2019
by
Chayaa852
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Login page UI issue
parent
9832c508
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
25 deletions
app/build.gradle
app/src/main/java/com/vsoft/vera/CatalogueApplication.java
app/src/main/java/com/vsoft/vera/ui/ADALActivity.java
app/src/main/java/com/vsoft/vera/ui/ChatActivity.java
app/src/main/java/com/vsoft/vera/ui/HomeScreen.java
app/src/main/java/com/vsoft/vera/utils/Util.java
app/vportal/staging/app-vportal-staging.apk
app/vportal/staging/output.json
app/build.gradle
View file @
493df8e0
...
@@ -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.
6
"
versionName
"0.1.
7
"
}
}
}
}
}
}
...
...
app/src/main/java/com/vsoft/vera/CatalogueApplication.java
View file @
493df8e0
...
@@ -156,6 +156,7 @@ public class CatalogueApplication extends MultiDexApplication {
...
@@ -156,6 +156,7 @@ public class CatalogueApplication extends MultiDexApplication {
options
.
upgrade
=
true
;
options
.
upgrade
=
true
;
mSocket
=
IO
.
socket
(
Constants
.
CHAT_SERVER_URL
,
options
);
mSocket
=
IO
.
socket
(
Constants
.
CHAT_SERVER_URL
,
options
);
mSocket
.
io
().
timeout
(-
1
);
mSocket
.
io
().
timeout
(-
1
);
mSocket
.
io
().
reconnection
(
true
);
mSocket
.
io
().
reconnection
(
true
);
mSocket
.
io
().
reconnectionDelay
(
0
);
mSocket
.
io
().
reconnectionDelay
(
0
);
...
...
app/src/main/java/com/vsoft/vera/ui/ADALActivity.java
View file @
493df8e0
...
@@ -3,12 +3,14 @@ package com.vsoft.vera.ui;
...
@@ -3,12 +3,14 @@ package com.vsoft.vera.ui;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.app.ProgressDialog
;
import
android.app.ProgressDialog
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences
;
import
android.graphics.drawable.Drawable
;
import
android.graphics.drawable.Drawable
;
import
android.os.AsyncTask
;
import
android.os.AsyncTask
;
import
android.os.Build
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.CountDownTimer
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.os.Looper
;
import
android.os.Message
;
import
android.os.Message
;
...
@@ -18,6 +20,7 @@ import android.support.v7.app.AppCompatActivity;
...
@@ -18,6 +20,7 @@ import android.support.v7.app.AppCompatActivity;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
...
@@ -69,6 +72,8 @@ import java.util.List;
...
@@ -69,6 +72,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
static
com
.
vsoft
.
vera
.
utils
.
Util
.
convertDpToPx
;
public
class
ADALActivity
extends
AppCompatActivity
{
public
class
ADALActivity
extends
AppCompatActivity
{
...
@@ -121,6 +126,7 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -121,6 +126,7 @@ public class ADALActivity extends AppCompatActivity {
private
static
final
boolean
sTelemetryAggregationIsRequired
=
true
;
private
static
final
boolean
sTelemetryAggregationIsRequired
=
true
;
private
LinearLayout
mainLayt
;
private
LinearLayout
mainLayt
;
private
Handler
mWaitHandler
=
new
Handler
();
/* Telemetry dispatcher registration */
/* Telemetry dispatcher registration */
static
{
static
{
...
@@ -169,10 +175,15 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -169,10 +175,15 @@ public class ADALActivity extends AppCompatActivity {
callGraphButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
callGraphButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(
NetworkConnectivity
.
haveNetworkConnection
(
ADALActivity
.
this
))
{
if
(
NetworkConnectivity
.
haveNetworkConnection
(
ADALActivity
.
this
))
{
onCallGraphClicked
();
onCallGraphClicked
();
mWaitHandler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
updateSuccessUI
();
}
},
5000
);
}
else
{
}
else
{
DialogUtils
.
showNoConnectionDialog
(
ADALActivity
.
this
);
DialogUtils
.
showNoConnectionDialog
(
ADALActivity
.
this
);
...
@@ -185,10 +196,8 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -185,10 +196,8 @@ 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();
Intent
intent
=
new
Intent
(
ADALActivity
.
this
,
OtpValidationActivity
.
class
);
Intent
intent
=
new
Intent
(
ADALActivity
.
this
,
OtpValidationActivity
.
class
);
startActivity
(
intent
);
startActivity
(
intent
);
}
}
});
});
...
@@ -284,13 +293,13 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -284,13 +293,13 @@ public class ADALActivity extends AppCompatActivity {
private
void
callGraphAPI
()
{
private
void
callGraphAPI
()
{
Log
.
d
(
TAG
,
"Starting volley request to graph"
);
mProgressDlg
=
new
ProgressDialog
(
ADALActivity
.
this
);
mProgressDlg
=
new
ProgressDialog
(
ADALActivity
.
this
);
mProgressDlg
.
setMessage
(
getString
(
R
.
string
.
loading_string
));
mProgressDlg
.
setMessage
(
getString
(
R
.
string
.
loading_string
));
mProgressDlg
.
show
();
mProgressDlg
.
show
();
mProgressDlg
.
setCancelable
(
false
);
mProgressDlg
.
setCancelable
(
false
);
Log
.
d
(
TAG
,
"Starting volley request to graph"
);
/* Make sure we have a token to send to graph */
/* Make sure we have a token to send to graph */
if
(
mAuthResult
.
getAccessToken
()
==
null
)
{
return
;}
if
(
mAuthResult
.
getAccessToken
()
==
null
)
{
return
;}
...
@@ -317,7 +326,6 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -317,7 +326,6 @@ public class ADALActivity extends AppCompatActivity {
/*Send broadcast to start SyncService*/
/*Send broadcast to start SyncService*/
if
(!
isLogin
){
if
(!
isLogin
){
new
LoginDetailsSendToServer
().
execute
();
new
LoginDetailsSendToServer
().
execute
();
}
}
...
@@ -325,7 +333,6 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -325,7 +333,6 @@ public class ADALActivity extends AppCompatActivity {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
},
new
Response
.
ErrorListener
()
{
},
new
Response
.
ErrorListener
()
{
@Override
@Override
...
@@ -378,19 +385,24 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -378,19 +385,24 @@ public class ADALActivity extends AppCompatActivity {
// Called on success from /me endpoint
// Called on success from /me endpoint
// Removed call Graph API button and paint Sign out
// Removed call Graph API button and paint Sign out
callGraphButton
.
setVisibility
(
View
.
GONE
);
login_with_otp
.
setVisibility
(
View
.
GONE
);
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
convertDpToPx
(
this
,
300
),
convertDpToPx
(
this
,
450
));
layoutParams
.
setMargins
(
convertDpToPx
(
this
,
30
),
convertDpToPx
(
this
,
30
),
convertDpToPx
(
this
,
30
),
convertDpToPx
(
this
,
30
));
logo_banner
.
setLayoutParams
(
layoutParams
);
signOutButton
.
setVisibility
(
View
.
GONE
);
signOutButton
.
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
welcome
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
welcome
).
setVisibility
(
View
.
GONE
);
((
TextView
)
findViewById
(
R
.
id
.
welcome
)).
setText
(
"Welcome, "
+
/*
((TextView) findViewById(R.id.welcome)).setText("Welcome, " +
mAuthResult
.
getUserInfo
().
getGivenName
());
mAuthResult.getUserInfo().getGivenName());
*/
findViewById
(
R
.
id
.
graphData
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
graphData
).
setVisibility
(
View
.
GONE
);
}
}
@SuppressLint
(
"SetTextI18n"
)
@SuppressLint
(
"SetTextI18n"
)
private
void
updateSignedOutUI
()
{
private
void
updateSignedOutUI
()
{
signOutButton
.
setVisibility
(
View
.
GONE
);
signOutButton
.
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
welcome
).
setVisibility
(
View
.
INVISIBLE
);
findViewById
(
R
.
id
.
welcome
).
setVisibility
(
View
.
INVISIBLE
);
findViewById
(
R
.
id
.
graphData
).
setVisibility
(
View
.
INVISIBLE
);
findViewById
(
R
.
id
.
graphData
).
setVisibility
(
View
.
INVISIBLE
);
...
@@ -427,8 +439,6 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -427,8 +439,6 @@ public class ADALActivity extends AppCompatActivity {
/* Successfully got a token, call graph now */
/* Successfully got a token, call graph now */
Log
.
d
(
TAG
,
"Successfully authenticated"
);
Log
.
d
(
TAG
,
"Successfully authenticated"
);
/* Store the mAuthResult */
/* Store the mAuthResult */
mAuthResult
=
authenticationResult
;
mAuthResult
=
authenticationResult
;
...
@@ -440,7 +450,6 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -440,7 +450,6 @@ public class ADALActivity extends AppCompatActivity {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
updateSuccessUI
();
updateSuccessUI
();
}
}
});
});
}
}
...
@@ -522,6 +531,7 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -522,6 +531,7 @@ public class ADALActivity extends AppCompatActivity {
updateSuccessUI
();
updateSuccessUI
();
}
}
});
});
/* set the sIntSignInInvoked boolean back to false */
/* set the sIntSignInInvoked boolean back to false */
sIntSignInInvoked
.
set
(
false
);
sIntSignInInvoked
.
set
(
false
);
}
}
...
@@ -714,5 +724,4 @@ public class ADALActivity extends AppCompatActivity {
...
@@ -714,5 +724,4 @@ public class ADALActivity extends AppCompatActivity {
}
}
}
}
}
}
}
}
app/src/main/java/com/vsoft/vera/ui/ChatActivity.java
View file @
493df8e0
...
@@ -1337,8 +1337,8 @@ public class ChatActivity extends AppCompatActivity implements OnDSListener, OnD
...
@@ -1337,8 +1337,8 @@ public class ChatActivity extends AppCompatActivity implements OnDSListener, OnD
mSocket
.
off
(
Socket
.
EVENT_CONNECT
,
onConnect
);
mSocket
.
off
(
Socket
.
EVENT_CONNECT
,
onConnect
);
mSocket
.
off
(
Socket
.
EVENT_DISCONNECT
,
onDisconnect
);
mSocket
.
off
(
Socket
.
EVENT_DISCONNECT
,
onDisconnect
);
mSocket
.
off
(
Socket
.
EVENT_CONNECT_ERROR
,
onConnectError
);
mSocket
.
off
(
Socket
.
EVENT_CONNECT_ERROR
,
onConnectError
);
mSocket
.
o
n
(
Socket
.
EVENT_CONNECT_TIMEOUT
,
onConnectTimeOut
);
mSocket
.
o
ff
(
Socket
.
EVENT_CONNECT_TIMEOUT
,
onConnectTimeOut
);
mSocket
.
o
n
(
Socket
.
EVENT_RECONNECT
,
onReconnect
);
mSocket
.
o
ff
(
Socket
.
EVENT_RECONNECT
,
onReconnect
);
mSocket
.
off
(
NEW_MESSAGE
,
onNewMessage
);
mSocket
.
off
(
NEW_MESSAGE
,
onNewMessage
);
mSocket
.
off
(
AUTHENTICATED
,
authenticated
);
mSocket
.
off
(
AUTHENTICATED
,
authenticated
);
mSocket
.
off
(
UNAUTHORIZED
,
unAuthorized
);
mSocket
.
off
(
UNAUTHORIZED
,
unAuthorized
);
...
...
app/src/main/java/com/vsoft/vera/ui/HomeScreen.java
View file @
493df8e0
...
@@ -208,6 +208,9 @@ public class HomeScreen extends HandleNotificationActivity {
...
@@ -208,6 +208,9 @@ public class HomeScreen extends HandleNotificationActivity {
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
"Username: "
);
stringBuilder
.
append
(
"Username: "
);
stringBuilder
.
append
(
userFullName
);
stringBuilder
.
append
(
userFullName
);
stringBuilder
.
append
(
"\n"
);
stringBuilder
.
append
(
"\n"
);
stringBuilder
.
append
(
"Version: "
+
BuildConfig
.
VERSION_NAME
);
builder
.
setMessage
(
stringBuilder
.
toString
())
builder
.
setMessage
(
stringBuilder
.
toString
())
.
setTitle
(
"User Details"
)
.
setTitle
(
"User Details"
)
...
...
app/src/main/java/com/vsoft/vera/utils/Util.java
View file @
493df8e0
...
@@ -1160,9 +1160,16 @@ public class Util {
...
@@ -1160,9 +1160,16 @@ public class Util {
})
})
// .setNegativeButton(android.R.string.no, null)
// .setNegativeButton(android.R.string.no, null)
.
show
();
.
show
();
}
/**
* This method converts dp unit to equivalent pixels, depending on device density.
*
* @param dp A value in dp (density independent pixels) unit. Which we need to convert into pixels
* @param context Context to get resources and device specific display metrics
* @return A int value to represent px equivalent to dp depending on device density
*/
public
static
int
convertDpToPx
(
Context
context
,
float
dp
)
{
return
(
int
)
(
dp
*
context
.
getResources
().
getDisplayMetrics
().
density
);
}
}
}
}
app/vportal/staging/app-vportal-staging.apk
deleted
100644 → 0
View file @
9832c508
The file could not be displayed because it is too large.
app/vportal/staging/output.json
deleted
100644 → 0
View file @
9832c508
[{
"outputType"
:{
"type"
:
"APK"
},
"apkData"
:{
"type"
:
"MAIN"
,
"splits"
:[],
"versionCode"
:
1
,
"versionName"
:
"0.1.5"
,
"enabled"
:
true
,
"outputFile"
:
"app-vportal-staging.apk"
,
"fullName"
:
"vportalStaging"
,
"baseName"
:
"vportal-staging"
},
"path"
:
"app-vportal-staging.apk"
,
"properties"
:{}}]
\ No newline at end of file
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