سؤال

I want to open ContentHandler to show image in full screen.So i used the following code to view a selected image in full screen

Invocation invocation = new Invocation(imageFilePath);  
invocation.setAction(ContentHandler.ACTION_OPEN);
Registry _registry = Registry .getRegistry(mypackagename.myuiapplication);
_registry.invoke(invocation);

The above code woks perfectly. But when I viewed an image in full screen and exit the application. But my application reopen itself.

why does my application shows such a wired behavior?

هل كانت مفيدة؟

المحلول

I hope I got the solution. The application waits for Invocation response.Here is the solution

Invocation invocation = new Invocation(imageFilePath);  
invocation.setAction(ContentHandler.ACTION_OPEN);
Registry _registry = Registry .getRegistry(mypackagename.myuiapplication);
_registry.setListener(responseListener);
registry.cancelGetResponse();
_registry.invoke(invocation);


private ResponseListener responseListener = new ResponseListener() {

    public void invocationResponseNotify(Registry registry) {
        registry.getResponse(false);
    }
};
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top