public void notifyServiceToGui(@NonNull String notificationType, @Nullable WiFiP2pService service) {
    """
	Method to send in broadcast a new discovered service to the UI.
    """
        Intent intent = new Intent();
        if (service != null) {
            intent.putExtra(SERVICE_NAME, service.getDevice().deviceName);
            intent.putExtra(SERVICE_ADDRESS, service.getDevice().deviceAddress);
            intent.putExtra(SERVICE_IDENTIFIER, service.getIdentifier());
        }
        intent.setAction(notificationType);
        mContext.sendBroadcast(intent);
    }
public void notifyServiceToGui(@NonNull String notificationType, @Nullable WiFiP2pService service) {
        Intent intent = new Intent();
        if (service != null) {
            intent.putExtra(SERVICE_NAME, service.getDevice().deviceName);
            intent.putExtra(SERVICE_ADDRESS, service.getDevice().deviceAddress);
            intent.putExtra(SERVICE_IDENTIFIER, service.getIdentifier());
        }
        intent.setAction(notificationType);
        mContext.sendBroadcast(intent);
    }
public void notifyServiceToGui ( @ NonNull String notificationType , @ Nullable WiFiP2pService service ) { Intent intent = new Intent ( ) ; if ( service != null ) { intent . putExtra ( SERVICE_NAME , service . getDevice ( ) . deviceName ) ; intent . putExtra ( SERVICE_ADDRESS , service . getDevice ( ) . deviceAddress ) ; intent . putExtra ( SERVICE_IDENTIFIER , service . getIdentifier ( ) ) ; } intent . setAction ( notificationType ) ; mContext . sendBroadcast ( intent ) ; }
Method to send in broadcast a new discovered service to the UI.
Method to send in broadcast a new discovered service to the UI .