private void registerPushServices ( ) { RespokeClient activeInstance = null ; // If there are already client instances running, check if any of them have already connected for ( RespokeClient eachInstance : instances ) { if ( eachInstance . isConnected ( ) ) { // The push service only supports one endpoint per device, so the token only needs to be registered for the first active client (if there is more than one) activeInstance = eachInstance ; } } if ( null != activeInstance ) { // Notify the Respoke servers that this device is eligible to receive notifications directed at this endpointID activeInstance . registerPushServicesWithToken ( pushToken ) ; } }
Attempt to register push services for this device