Is that possible to get device token using OneSignal

Maybe someone knows how to get device token when using OneSignal to receive notifications?


  • This is it:

    OneSignal.idsAvailable(new OneSignal.IdsAvailableHandler() {
                public void idsAvailable(String userId, String registrationId) {
                    Log.d("debug", "User:" + userId);
                    if (registrationId != null)
                        Log.d("debug", "registrationId:" + registrationId);

    It helps to get user id and that is actually a device token.