Skip to content

Commit 22cb57b

Browse files
committed
Add OSDeviceInfoError and OSDeviceInfoCompletionHandler
* Add OSDeviceInfoError and OSDeviceInfoCompletionHandler to OneSignal.java
1 parent fb747a0 commit 22cb57b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,25 @@ public static class SendTagsError {
229229
public String getMessage() { return message; }
230230
}
231231

232+
public static class OSDeviceInfoError {
233+
private int errorCode;
234+
private String message;
235+
236+
OSDeviceInfoError(int errorCode, String message) {
237+
this.errorCode = errorCode;
238+
this.message = message;
239+
}
240+
241+
public int getCode() { return errorCode; }
242+
243+
public String getMessage() { return message; }
244+
}
245+
246+
public interface OSDeviceInfoCompletionHandler {
247+
void onSuccess(String results);
248+
void onFailure(OSDeviceInfoError error);
249+
}
250+
232251
public enum ExternalIdErrorType {
233252
REQUIRES_EXTERNAL_ID_AUTH, INVALID_OPERATION, NETWORK
234253
}

0 commit comments

Comments
 (0)