-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1768 from OneSignal/user-model/user-events
[User model] Push Subscription Changed Event
- Loading branch information
Showing
14 changed files
with
127 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
...al/user/subscriptions/SubscriptionList.kt → ...nternal/subscriptions/SubscriptionList.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ignal/core/src/main/java/com/onesignal/user/subscriptions/PushSubscriptionChangedState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.onesignal.user.subscriptions | ||
|
||
class PushSubscriptionChangedState( | ||
val previous: PushSubscriptionState, | ||
val current: PushSubscriptionState | ||
) |
28 changes: 28 additions & 0 deletions
28
...DK/onesignal/core/src/main/java/com/onesignal/user/subscriptions/PushSubscriptionState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.onesignal.user.subscriptions | ||
|
||
/** | ||
* A subscription state. | ||
*/ | ||
class PushSubscriptionState( | ||
/** | ||
* The unique identifier for this subscription. This will be an empty string | ||
* until the subscription has been successfully created on the backend and | ||
* assigned an ID. Use [addObserver] to be notified when the [id] has | ||
* been successfully assigned. | ||
*/ | ||
val id: String, | ||
|
||
/** | ||
* The token which identifies the device/app that notifications are to be sent. May | ||
* be an empty string, indicating the push token has not yet been retrieved. | ||
*/ | ||
val token: String, | ||
|
||
/** | ||
* Whether the user of this subscription is opted-in to received notifications. When true, | ||
* the user is able to receive notifications through this subscription. Otherwise, the | ||
* user will not receive notifications through this subscription (even when the user has | ||
* granted app permission). | ||
*/ | ||
val optedIn: Boolean | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters