Package org.jupnp.android
Schnittstelle AndroidUpnpService
- Alle bekannten Implementierungsklassen:
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"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
You also have to add the application service component:
<application ...>
...
<service android:name="org.jupnp.android.AndroidUpnpServiceImpl"/>
</application>
- Autor:
- Christian Bauer
-
Methodenübersicht
-
Methodendetails
-
get
UpnpService get()- Gibt zurück:
- The actual main instance and interface of the UPnP service.
-
getConfiguration
UpnpServiceConfiguration getConfiguration()- Gibt zurück:
- The configuration of the UPnP service.
-
getRegistry
Registry getRegistry()- Gibt zurück:
- The registry of the UPnP service.
-
getControlPoint
ControlPoint getControlPoint()- Gibt zurück:
- The client API of the UPnP service.
-