Skip to content

Commit fd2fd4c

Browse files
committed
Add Deprecation comment
* Add OneSignalHmsEventBridge onNewToken comment
1 parent 9ebad14 commit fd2fd4c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Examples/OneSignalDemo/app/src/huawei/java/com/onesignal/sdktest/notification/HmsMessageServiceAppLevel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
public class HmsMessageServiceAppLevel extends HmsMessageService {
1111

12-
1312
/**
1413
* When an app calls the getToken method to apply for a token from the server,
1514
* if the server does not return the token during current method calling, the server can return the token through this method later.

OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignalHmsEventBridge.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@
1818
*/
1919
public class OneSignalHmsEventBridge {
2020

21+
/**
22+
* Method used by last HMS push version 5.3.0.304 and upper
23+
*/
2124
public static void onNewToken(@NonNull Context context, @NonNull String token, @Nullable Bundle bundle) {
2225
OneSignal.Log(OneSignal.LOG_LEVEL.INFO, "HmsMessageServiceOneSignal.onNewToken - HMS token: " + token + " Bundle: " + bundle);
2326
PushRegistratorHMS.fireCallback(token);
2427
}
2528

29+
/**
30+
* This method is being deprecated
31+
* @see OneSignalHmsEventBridge#onNewToken(Context, String, Bundle)
32+
*/
2633
@Deprecated
2734
public static void onNewToken(@NonNull Context context, @NonNull String token) {
2835
onNewToken(context, token, null);

0 commit comments

Comments
 (0)