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
b2c0d021
Commit
b2c0d021
authored
Sep 15, 2017
by
Rafael Kellermann Streit
Committed by
GitHub
Sep 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #462 from RocketChat/fix/notifications-using-gateway
[FIX] Set app to always use the Push Gateway
parents
f0b2b078
71a24273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
GcmPushRegistrationObserver.java
...android/service/observer/GcmPushRegistrationObserver.java
+7
-15
No files found.
app/src/main/java/chat/rocket/android/service/observer/GcmPushRegistrationObserver.java
View file @
b2c0d021
package
chat
.
rocket
.
android
.
service
.
observer
;
import
android.content.Context
;
import
com.google.android.gms.gcm.GoogleCloudMessaging
;
import
com.google.android.gms.iid.InstanceID
;
import
android.content.Context
;
import
io.realm.Realm
;
import
io.realm.RealmResults
;
import
java.io.IOException
;
import
java.util.List
;
import
bolts.Task
;
import
chat.rocket.android.R
;
import
chat.rocket.android.RocketChatCache
;
import
chat.rocket.android.api.RaixPushHelper
;
import
chat.rocket.android.helper.LogIfError
;
import
chat.rocket.android.service.DDPClientRef
;
import
chat.rocket.core.SyncState
;
import
chat.rocket.persistence.realm.models.ddp.RealmPublicSetting
;
import
chat.rocket.core.PublicSettingsConstants
;
import
chat.rocket.persistence.realm.RealmHelper
;
import
chat.rocket.persistence.realm.models.ddp.RealmUser
;
import
chat.rocket.persistence.realm.models.internal.GcmPushRegistration
;
import
chat.rocket.persistence.realm.RealmHelper
;
import
chat.rocket.android.service.DDPClientRef
;
import
io.realm.Realm
;
import
io.realm.RealmResults
;
/**
* call raix:push-update if needed.
...
...
@@ -83,13 +82,6 @@ public class GcmPushRegistrationObserver extends AbstractModelObserver<GcmPushRe
}
private
String
getSenderId
()
{
final
String
senderId
=
RealmPublicSetting
.
getString
(
realmHelper
,
PublicSettingsConstants
.
Push
.
GCM_PROJECT_NUMBER
,
""
).
trim
();
if
(
senderId
.
length
()
!=
0
)
{
return
senderId
;
}
return
context
.
getString
(
R
.
string
.
gcm_sender_id
);
}
...
...
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