Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
6fdd22fb
Commit
6fdd22fb
authored
Sep 05, 2018
by
Sajal Narang
Committed by
GitHub
Sep 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #197 from safwankdb/master
Notification has navigate button only when venue exists
parents
6cc015bc
d8296b96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
app/src/main/java/app/insti/notifications/NotificationIntentService.java
...va/app/insti/notifications/NotificationIntentService.java
+11
-8
No files found.
app/src/main/java/app/insti/notifications/NotificationIntentService.java
View file @
6fdd22fb
...
@@ -184,14 +184,17 @@ public class NotificationIntentService extends JobIntentService {
...
@@ -184,14 +184,17 @@ public class NotificationIntentService extends JobIntentService {
builder
.
setContentIntent
(
pendingIntent
);
builder
.
setContentIntent
(
pendingIntent
);
builder
.
setDeleteIntent
(
NotificationEventReceiver
.
getDeleteIntent
(
getApplicationContext
()));
builder
.
setDeleteIntent
(
NotificationEventReceiver
.
getDeleteIntent
(
getApplicationContext
()));
Intent
navigateIntent
=
new
Intent
(
getApplicationContext
(),
NotificationIntentService
.
class
);
if
(
event
.
getEventVenues
().
size
()
>
0
)
navigateIntent
.
setAction
(
ACTION_NAVIGATE
);
{
navigateIntent
.
putExtra
(
Constants
.
EVENT_ID
,
event
.
getEventID
());
Intent
navigateIntent
=
new
Intent
(
getApplicationContext
(),
NotificationIntentService
.
class
);
navigateIntent
.
putExtra
(
Constants
.
EVENT_LATITUDE
,
event
.
getEventVenues
().
get
(
0
).
getVenueLatitude
());
navigateIntent
.
setAction
(
ACTION_NAVIGATE
);
navigateIntent
.
putExtra
(
Constants
.
EVENT_LONGITUDE
,
event
.
getEventVenues
().
get
(
0
).
getVenueLongitude
());
navigateIntent
.
putExtra
(
Constants
.
EVENT_ID
,
event
.
getEventID
());
navigateIntent
.
putExtra
(
"NOTIFICATION_ID"
,
NOTIFICATION_ID
);
navigateIntent
.
putExtra
(
Constants
.
EVENT_LATITUDE
,
event
.
getEventVenues
().
get
(
0
).
getVenueLatitude
());
PendingIntent
navigatePendingIntent
=
PendingIntent
.
getService
(
getApplicationContext
(),
0
,
navigateIntent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
navigateIntent
.
putExtra
(
Constants
.
EVENT_LONGITUDE
,
event
.
getEventVenues
().
get
(
0
).
getVenueLongitude
());
builder
.
addAction
(
R
.
drawable
.
baseline_navigation_white_24
,
"Navigate"
,
navigatePendingIntent
);
navigateIntent
.
putExtra
(
"NOTIFICATION_ID"
,
NOTIFICATION_ID
);
PendingIntent
navigatePendingIntent
=
PendingIntent
.
getService
(
getApplicationContext
(),
0
,
navigateIntent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
builder
.
addAction
(
R
.
drawable
.
baseline_navigation_white_24
,
"Navigate"
,
navigatePendingIntent
);
}
Intent
notGoingIntent
=
new
Intent
(
getApplicationContext
(),
NotificationIntentService
.
class
);
Intent
notGoingIntent
=
new
Intent
(
getApplicationContext
(),
NotificationIntentService
.
class
);
notGoingIntent
.
setAction
(
ACTION_NOT_GOING
);
notGoingIntent
.
setAction
(
ACTION_NOT_GOING
);
...
...
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