Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
0a613c0d
Commit
0a613c0d
authored
Feb 21, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support back for the test push
parent
93333f70
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
AbstractAuthedActivity.java
.../chat/rocket/android/activity/AbstractAuthedActivity.java
+5
-5
PushNotificationHandler.java
...ava/chat/rocket/android/push/PushNotificationHandler.java
+5
-6
No files found.
app/src/main/java/chat/rocket/android/activity/AbstractAuthedActivity.java
View file @
0a613c0d
...
...
@@ -56,13 +56,13 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
editor
.
putString
(
RocketChatCache
.
KEY_SELECTED_ROOM_ID
,
intent
.
getStringExtra
(
PushConstants
.
ROOM_ID
));
}
editor
.
apply
();
}
if
(
intent
.
hasExtra
(
PushConstants
.
NOT_ID
))
{
PushNotificationHandler
.
cleanUpNotificationStack
(
intent
.
getIntExtra
(
PushConstants
.
NOT_ID
,
0
));
}
editor
.
apply
();
}
}
private
void
updateHostnameIfNeeded
(
SharedPreferences
prefs
)
{
...
...
app/src/main/java/chat/rocket/android/push/PushNotificationHandler.java
View file @
0a613c0d
...
...
@@ -102,17 +102,16 @@ public class PushNotificationHandler implements PushConstants {
String
hostname
=
getHostname
(
extras
);
String
roomId
=
getRoomId
(
extras
);
if
(
hostname
==
null
||
roomId
==
null
||
!
isValidHostname
(
context
,
hostname
))
{
return
;
}
int
notId
=
parseInt
(
NOT_ID
,
extras
);
Intent
notificationIntent
=
new
Intent
(
context
,
MainActivity
.
class
);
notificationIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
notificationIntent
.
putExtra
(
PUSH_BUNDLE
,
extras
);
notificationIntent
.
putExtra
(
NOT_ID
,
notId
);
if
(
hostname
!=
null
&&
roomId
!=
null
&&
isValidHostname
(
context
,
hostname
))
{
notificationIntent
.
putExtra
(
HOSTNAME
,
hostname
);
notificationIntent
.
putExtra
(
ROOM_ID
,
roomId
);
notificationIntent
.
putExtra
(
NOT_ID
,
notId
);
}
int
requestCode
=
random
.
nextInt
();
PendingIntent
contentIntent
=
PendingIntent
...
...
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