org.fourthline.cling.android.AndroidUpnpServiceImpl Java Examples

The following examples show how to use org.fourthline.cling.android.AndroidUpnpServiceImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BrowserActivity.java    From DroidDLNA with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Fix the logging integration between java.util.logging and Android
    // internal logging
    org.seamless.util.logging.LoggingUtil.resetRootHandler(new FixedAndroidHandler());
    // Now you can enable logging as needed for various categories of Cling:
    // Logger.getLogger("org.fourthline.cling").setLevel(Level.FINEST);

    listAdapter = new ArrayAdapter<DeviceDisplay>(this, android.R.layout.simple_list_item_1);
    setListAdapter(listAdapter);

    // This will start the UPnP service if it wasn't already started
    getApplicationContext().bindService(new Intent(this, AndroidUpnpServiceImpl.class),
            serviceConnection, Context.BIND_AUTO_CREATE);
}
 
Example #2
Source File: DevicesActivity.java    From DroidDLNA with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

	// Fix the logging integration between java.util.logging and Android
	// internal logging
	LoggingUtil.resetRootHandler(new FixedAndroidHandler());
	Logger.getLogger("org.teleal.cling").setLevel(Level.INFO);

	setContentView(R.layout.devices);
	init();

	deviceListRegistryListener = new DeviceListRegistryListener();

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