-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TTL notification display control
* Notifications where being batches and displayed by android standBy * For cases where notification sent time + ttl is more than the current time, don't display notification
- Loading branch information
Showing
13 changed files
with
220 additions
and
61 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
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
32 changes: 32 additions & 0 deletions
32
OneSignalSDK/unittest/src/test/java/com/onesignal/ShadowHmsRemoteMessage.java
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,32 @@ | ||
package com.onesignal; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
import com.huawei.hms.push.RemoteMessage; | ||
|
||
import org.robolectric.annotation.Implementation; | ||
import org.robolectric.annotation.Implements; | ||
|
||
@Implements(RemoteMessage.class) | ||
public class ShadowHmsRemoteMessage { | ||
|
||
@Nullable | ||
public static String data; | ||
public static int ttl; | ||
public static long sentTime; | ||
|
||
@Implementation | ||
public String getData() { | ||
return data; | ||
} | ||
|
||
@Implementation | ||
public int getTtl() { | ||
return ttl; | ||
} | ||
|
||
public long getSentTime() { | ||
return sentTime; | ||
} | ||
|
||
} |
Oops, something went wrong.