[jitsi-dev] Plug in development.


#1

Hi,
    Can you please give the solution for getting UIService in my plug in?

    I created my plug in and write code for getting UIservices, but did not
get the reference. Please give me a solution. I am stuck in my development.

The code i write in my plug

public static UIService getUIService()
    {
        if(uiService == null)
        {
            ServiceReference uiServiceReference
                = bundleContext.getServiceReference(
                    UIService.class.getName());
            uiService = (UIService)bundleContext
                .getService(uiServiceReference);
        }
        return uiService;
    }

Please give a solution.

···

--
Thanks & Regards,

*Vishnu A U* *.*


#2

Hey,

it can be that your plugin is registered before the ui bundle, you need to
add service listener to the bundle context and wait for the UIService to
appear (addServiceListener). You can check there are a lot of examples in
the code.

Hope this helps
damencho

···

On Fri, Jun 14, 2013 at 9:20 AM, ViShNu UnNi <ampady1987@gmail.com> wrote:

Hi,
    Can you please give the solution for getting UIService in my plug in?

    I created my plug in and write code for getting UIservices, but did
not get the reference. Please give me a solution. I am stuck in my
development.

The code i write in my plug

public static UIService getUIService()
    {
        if(uiService == null)
        {
            ServiceReference uiServiceReference
                = bundleContext.getServiceReference(
                    UIService.class.getName());
            uiService = (UIService)bundleContext
                .getService(uiServiceReference);
        }
        return uiService;
    }

Please give a solution.
--
Thanks & Regards,

*Vishnu A U* *.*

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev