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
42df940d
authored
Jan 09, 2019
by
HABI SHAIK
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
resolved dependency issue and added alert instead of toast in login screen
parent
e1d947da
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
7 deletions
app/build.gradle
app/src/main/java/com/vsoft/servicenow/ui/LoginScreen.java
app/src/main/java/com/vsoft/servicenow/utils/Util.java
build.gradle
gradle/wrapper/gradle-wrapper.properties
app/build.gradle
View file @
42df940d
...
@@ -124,6 +124,7 @@ dependencies {
...
@@ -124,6 +124,7 @@ dependencies {
implementation
(
'com.google.firebase:firebase-messaging:15.0.2'
)
{
implementation
(
'com.google.firebase:firebase-messaging:15.0.2'
)
{
exclude
group:
'com.google.firebase'
,
module:
'firebase-iid'
exclude
group:
'com.google.firebase'
,
module:
'firebase-iid'
}
}
implementation
'com.google.firebase:firebase-core:15.0.2'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
...
...
app/src/main/java/com/vsoft/servicenow/ui/LoginScreen.java
View file @
42df940d
...
@@ -269,12 +269,12 @@ public class LoginScreen extends Activity {
...
@@ -269,12 +269,12 @@ public class LoginScreen extends Activity {
}
}
finish
();
finish
();
}
else
{
}
else
{
Toast
.
makeText
(
LoginScreen
.
this
,
R
.
string
.
user_detail_not_available
,
Toast
.
LENGTH_LONG
).
show
(
);
Util
.
simpleAlert
(
LoginScreen
.
this
,
getResources
().
getString
(
R
.
string
.
user_detail_not_available
)
);
}
}
}
else
if
(
syncStatus
==
API_FAIL_USER_LOGIN
)
{
}
else
if
(
syncStatus
==
API_FAIL_USER_LOGIN
)
{
Toast
.
makeText
(
LoginScreen
.
this
,
R
.
string
.
login_screen_invalid_username_and_password_string
,
Toast
.
LENGTH_LONG
).
show
(
);
Util
.
simpleAlert
(
LoginScreen
.
this
,
getResources
().
getString
(
R
.
string
.
login_screen_invalid_username_and_password_string
)
);
}
else
if
(
syncStatus
==
API_FAIL_USER_DETAIL
)
{
}
else
if
(
syncStatus
==
API_FAIL_USER_DETAIL
)
{
Toast
.
makeText
(
LoginScreen
.
this
,
R
.
string
.
failed_to_fetch_user_detail_string
,
Toast
.
LENGTH_LONG
).
show
(
);
Util
.
simpleAlert
(
LoginScreen
.
this
,
getResources
().
getString
(
R
.
string
.
failed_to_fetch_user_detail_string
)
);
}
}
}
}
}
}
...
...
app/src/main/java/com/vsoft/servicenow/utils/Util.java
View file @
42df940d
package
com
.
vsoft
.
servicenow
.
utils
;
package
com
.
vsoft
.
servicenow
.
utils
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
import
android.media.AudioManager
;
import
android.media.AudioManager
;
...
@@ -8,6 +9,7 @@ import android.media.MediaPlayer;
...
@@ -8,6 +9,7 @@ import android.media.MediaPlayer;
import
android.media.RingtoneManager
;
import
android.media.RingtoneManager
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v7.app.AlertDialog
;
import
android.text.Html
;
import
android.text.Html
;
import
android.text.InputType
;
import
android.text.InputType
;
import
android.text.Spanned
;
import
android.text.Spanned
;
...
@@ -922,6 +924,19 @@ public class Util {
...
@@ -922,6 +924,19 @@ public class Util {
return
textView
;
return
textView
;
}
}
public
static
void
simpleAlert
(
Context
context
,
String
msg
)
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
context
);
builder
.
setMessage
(
msg
)
.
setCancelable
(
false
)
.
setPositiveButton
(
R
.
string
.
ok_string
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
dialog
.
dismiss
();
}
});
AlertDialog
alert
=
builder
.
create
();
alert
.
show
();
}
public
static
String
getDefaultDate
()
{
public
static
String
getDefaultDate
()
{
Calendar
c
=
Calendar
.
getInstance
();
Calendar
c
=
Calendar
.
getInstance
();
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"dd MMM, yyyy"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"dd MMM, yyyy"
);
...
...
build.gradle
View file @
42df940d
...
@@ -8,9 +8,9 @@ buildscript {
...
@@ -8,9 +8,9 @@ buildscript {
maven
{
url
"https://jitpack.io"
}
maven
{
url
"https://jitpack.io"
}
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:3.
1.2
'
classpath
'com.android.tools.build:gradle:3.
2.1
'
classpath
'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath
'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath
'com.google.gms:google-services:
3.1
.0'
classpath
'com.google.gms:google-services:
4.2
.0'
// NOTE: Do not place your application dependencies here; they belong
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// in the individual module build.gradle files
...
...
gradle/wrapper/gradle-wrapper.properties
View file @
42df940d
#
Mon Apr 30 19:16:01 IST 2018
#
Wed Jan 09 12:34:55 IST 2019
distributionBase
=
GRADLE_USER_HOME
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-4.
4
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-4.
6
-all.zip
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