Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.android
Interface AndroidUpnpService

All Known Implementing Classes:
  AndroidUpnpServiceImpl.Binder

    public interface AndroidUpnpService

Interface of the Android UPnP application service component.

Usage example in an Android activity:

    AndroidUpnpService upnpService;

    ServiceConnection serviceConnection = new ServiceConnection() {
         public void onServiceConnected(ComponentName className, IBinder service) {
             upnpService = (AndroidUpnpService) service;
         }
         public void onServiceDisconnected(ComponentName className) {
             upnpService = null;
         }
    };

    public void onCreate(...) {
     ...
         getApplicationContext().bindService(
             new Intent(this, AndroidUpnpServiceImpl.class),
             serviceConnection,
             Context.BIND_AUTO_CREATE
         );
    }

The default implementation requires permissions in `AndroidManifest.xml`:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

You also have to add the application service component:

    <application ...>
      ...
      <service android:name="org.teleal.cling.android.AndroidUpnpServiceImpl"/>
    </application>

Author:
  Christian Bauer

Method Summary
`UpnpService` | `get()`
`UpnpServiceConfiguration` | `getConfiguration()`
`ControlPoint` | `getControlPoint()`
`Registry` | `getRegistry()`

Method Detail

### get

    UpnpService get()

  Returns:
    The actual main instance and interface of the UPnP service.

### getConfiguration

    UpnpServiceConfiguration getConfiguration()

  Returns:
    The configuration of the UPnP service.

### getRegistry

    Registry getRegistry()

  Returns:
    The registry of the UPnP service.

### getControlPoint

    ControlPoint getControlPoint()

  Returns:
    The client API of the UPnP service.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.