Search in sources :

Example 1 with DiscoveryManager

use of com.connectsdk.discovery.DiscoveryManager in project butter-android by butterproject.

the class NetcastTVService method getDIALService.

public DIALService getDIALService() {
    if (dialService == null) {
        DiscoveryManager discoveryManager = DiscoveryManager.getInstance();
        ConnectableDevice device = discoveryManager.getAllDevices().get(serviceDescription.getIpAddress());
        if (device != null) {
            DIALService foundService = null;
            for (DeviceService service : device.getServices()) {
                if (DIALService.class.isAssignableFrom(service.getClass())) {
                    foundService = (DIALService) service;
                    break;
                }
            }
            dialService = foundService;
        }
    }
    return dialService;
}
Also used : ConnectableDevice(com.connectsdk.device.ConnectableDevice) DiscoveryManager(com.connectsdk.discovery.DiscoveryManager)

Example 2 with DiscoveryManager

use of com.connectsdk.discovery.DiscoveryManager in project butter-android by butterproject.

the class NetcastTVService method getDLNAService.

public DLNAService getDLNAService() {
    if (dlnaService == null) {
        DiscoveryManager discoveryManager = DiscoveryManager.getInstance();
        ConnectableDevice device = discoveryManager.getAllDevices().get(serviceDescription.getIpAddress());
        if (device != null) {
            DLNAService foundService = null;
            for (DeviceService service : device.getServices()) {
                if (DLNAService.class.isAssignableFrom(service.getClass())) {
                    foundService = (DLNAService) service;
                    break;
                }
            }
            dlnaService = foundService;
        }
    }
    return dlnaService;
}
Also used : ConnectableDevice(com.connectsdk.device.ConnectableDevice) DiscoveryManager(com.connectsdk.discovery.DiscoveryManager)

Example 3 with DiscoveryManager

use of com.connectsdk.discovery.DiscoveryManager in project butter-android by butterproject.

the class RokuService method getDIALService.

public DIALService getDIALService() {
    if (dialService == null) {
        DiscoveryManager discoveryManager = DiscoveryManager.getInstance();
        ConnectableDevice device = discoveryManager.getAllDevices().get(serviceDescription.getIpAddress());
        if (device != null) {
            DIALService foundService = null;
            for (DeviceService service : device.getServices()) {
                if (DIALService.class.isAssignableFrom(service.getClass())) {
                    foundService = (DIALService) service;
                    break;
                }
            }
            dialService = foundService;
        }
    }
    return dialService;
}
Also used : ConnectableDevice(com.connectsdk.device.ConnectableDevice) DiscoveryManager(com.connectsdk.discovery.DiscoveryManager)

Aggregations

ConnectableDevice (com.connectsdk.device.ConnectableDevice)3 DiscoveryManager (com.connectsdk.discovery.DiscoveryManager)3