How to set my own icon on android Upnp Server?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set my own icon on android Upnp Server?

Daniel Villanueva
Hello,
I create a android Upnp Server, and it's visible on the Cling Workbench provides by (cling-distribution-2.0-alpha3).
My question is,

How to set my own icon on android Upnp Server?

Because now i see the default light icon of the example. I read the Cling Core User Manual, but i can't find a simple solution.
Thanks a lot!
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: How to set my own icon on android Upnp Server?

Daniel Villanueva
I do this, but it doesn't work. What is wrong?

protected Icon createDefaultDeviceIcon() {
    Uri uri = Uri.parse("android.resource://com.example.upnpserver/"+R.drawable.ic_launcher);
    System.out.println("uri: "+uri.toString());
    java.net.URI juri = null;
                try {
                        juri = new java.net.URI(uri.toString());
                        System.out.println("juri: "+juri.toString());
                } catch (URISyntaxException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
   
    Icon icon = new Icon("image/png",48,
       48,
       8,
       juri);

    return icon;
}