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
46a82503
Commit
46a82503
authored
Dec 28, 2016
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing files
parent
6ccb8ad4
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
274 additions
and
0 deletions
+274
-0
JsonConstants.java
...rc/main/java/chat/rocket/android/model/JsonConstants.java
+5
-0
PublicSettingsConstants.java
...hat/rocket/android/model/ddp/PublicSettingsConstants.java
+235
-0
PushUpdate.java
...ain/java/chat/rocket/android/model/params/PushUpdate.java
+34
-0
No files found.
app/src/main/java/chat/rocket/android/model/JsonConstants.java
0 → 100644
View file @
46a82503
package
chat
.
rocket
.
android
.
model
;
public
interface
JsonConstants
{
String
DATE
=
"$date"
;
}
app/src/main/java/chat/rocket/android/model/ddp/PublicSettingsConstants.java
0 → 100644
View file @
46a82503
This diff is collapsed.
Click to expand it.
app/src/main/java/chat/rocket/android/model/params/PushUpdate.java
0 → 100644
View file @
46a82503
package
chat
.
rocket
.
android
.
model
.
params
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
public
class
PushUpdate
{
private
String
pushId
;
private
String
gcmToken
;
private
String
userId
;
public
PushUpdate
(
@NonNull
String
pushId
,
@NonNull
String
gcmToken
,
@Nullable
String
userId
)
{
this
.
pushId
=
pushId
;
this
.
gcmToken
=
gcmToken
;
this
.
userId
=
userId
;
}
public
JSONObject
toJson
()
throws
JSONException
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"id"
,
pushId
);
param
.
put
(
"appName"
,
"main"
);
param
.
put
(
"userId"
,
userId
);
param
.
put
(
"metadata"
,
new
JSONObject
());
JSONObject
tokenParam
=
new
JSONObject
();
tokenParam
.
put
(
"gcm"
,
gcmToken
);
param
.
put
(
"token"
,
tokenParam
);
return
param
;
}
}
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