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
59e7f90f
Commit
59e7f90f
authored
Oct 22, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change how notifications are being built on Android M and lower
parent
89466fdf
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
192 additions
and
165 deletions
+192
-165
AbstractAuthedActivity.java
.../chat/rocket/android/activity/AbstractAuthedActivity.java
+2
-1
PushManager.kt
app/src/main/java/chat/rocket/android/push/PushManager.kt
+186
-158
GCMIntentService.java
...n/java/chat/rocket/android/push/gcm/GCMIntentService.java
+4
-6
No files found.
app/src/main/java/chat/rocket/android/activity/AbstractAuthedActivity.java
View file @
59e7f90f
...
...
@@ -69,6 +69,7 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
rocketChatCache
.
setSelectedRoomId
(
intent
.
getStringExtra
(
PushConstants
.
ROOM_ID
));
}
}
PushManager
.
INSTANCE
.
clearHostNotifications
(
hostname
);
}
else
{
updateHostnameIfNeeded
(
rocketChatCache
.
getSelectedServerHostname
());
}
...
...
@@ -76,7 +77,7 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
if
(
intent
.
hasExtra
(
PushConstants
.
NOT_ID
))
{
isNotification
=
true
;
int
notificationId
=
intent
.
getIntExtra
(
PushConstants
.
NOT_ID
,
0
);
PushManager
.
INSTANCE
.
clear
MessageBundle
(
notificationId
);
PushManager
.
INSTANCE
.
clear
NotificationIdStack
(
notificationId
);
}
}
...
...
app/src/main/java/chat/rocket/android/push/PushManager.kt
View file @
59e7f90f
This diff is collapsed.
Click to expand it.
app/src/main/java/chat/rocket/android/push/gcm/GCMIntentService.java
View file @
59e7f90f
package
chat
.
rocket
.
android
.
push
.
gcm
;
import
com.google.android.gms.gcm.GcmListenerService
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.content.res.Resources
;
import
android.os.Bundle
;
import
android.util.Log
;
import
com.google.android.gms.gcm.GcmListenerService
;
import
org.json.JSONArray
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
chat.rocket.android.push.PushConstants
;
import
chat.rocket.android.push.PushManager
;
import
chat.rocket.android.push.PushNotificationHandler
;
@SuppressLint
(
"NewApi"
)
public
class
GCMIntentService
extends
GcmListenerService
implements
PushConstants
{
...
...
@@ -34,9 +35,6 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
extras
=
normalizeExtras
(
applicationContext
,
extras
);
PushNotificationHandler
pushNotificationHandler
=
new
PushNotificationHandler
();
pushNotificationHandler
.
showNotificationIfPossible
(
applicationContext
,
extras
);
PushManager
.
INSTANCE
.
handle
(
applicationContext
,
extras
);
}
...
...
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