2014-04-25 8 views
1

나는 내가내 Blackberry Java 응용 프로그램이 다시 시작되는 이유는 무엇입니까?

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

위의 코드 웍 완벽하게 전체 화면에서 선택한 이미지를 보려면 다음 코드를 사용하여 전체 screen.So에 이미지를 표시 할 수 ContentHandler을 열고 자. 그러나 전체 화면으로 이미지를보고 응용 프로그램을 끝낼 때. 하지만 내 신청서가 다시 열립니다.

왜 내 응용 프로그램은 이러한 유선 동작을 보여 줍니까?

+0

검사 로그. 메모리 문제로 인해 수 있습니다. – Signare

+0

로그에 아무 것도 표시되지 않습니다. –

답변

1

나는 해결책을 얻길 바랍니다. 응용 프로그램이 호출 응답을 기다립니다. 여기에 해결책이 있습니다.

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); 
    } 
};