Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Invoke.invokeApplication() issue ???

Hi All,

i am try to invoke the native applications(memo/address book) from my application with the help of invoke api. i would like to invoke native applications with the existing objects(memo/contact). when i am trying to invoke the native(memo/address book)applications with existing objects(memo/contact) with the help of below statements

to invoke memo app
Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD, new MemoArguments( MemoArguments.ARG_EDIT , blackBerryMemo  ));

to invoke address book app
Invoke.invokeApplication(Invoke.APP_TYPE_ADDRESSBOOK, new AddressBookArguments( AddressBookArguments.ARG_NEW , blackBerryContact));

then nothing happen and blackberry JDE debugger stops at above statements.

So my question are
1: is this bug is from blackberry side?
2: why debugger stops at Invoke.invokeApplication() call when i am passing ApplicationArqument with two parameters.


please note that, i am able to invoke native apps(memo/address book) with default ApplicationArguments i.e.
Invoke.invokeApplication(Invoke.APP_TYPE_ADDRESSBOOK, new AddressBookArguments( )); and
Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD, new MemoArguments( ));

Can anyone help me..

Urgent !!!!
Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

When you say that the debugger stops, do you mean that the program thows an exception?

 

If so, what is the exception?

 

Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

hi

 

program doesn't throw any exception. only the debuger pointer doesn't move to the next statement in the code. it stops executing other statement in the code.

 

let say if i have code 

 

Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD, new MemoArguments( MemoArguments.ARG_EDIT , blackBerryMemo  ));

System.out.println("after invoke call");

 

then jde debugger doesn't execute the next statement and even doesn't thrown any exception.

 

thanks in advance

 

 

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

OK - I understand. The Invoke() call is blocking - so the thread is now out of your application and into the memopad (or whatever). The MemoPad application should now pop up and assume the focus.

 

If this is not happening, it may be because your application is not in foreground when the invoke() is called. If this is indeed the case, try a UiApplication.requestForeground() just prior to the invoke.

 

Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

Hi RexDoug,

 

As i have mentioned in my post that below statements are working

Invoke.invokeApplication(Invoke.APP_TYPE_ADDRESSBOOK, new AddressBookArguments( )); and
Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD, new MemoArguments( ));

 

with the help of above statements, i am able to invoke native apps with list screen

 

so, my question is

if invokeApplication() is blocking call, then why from above statements i am able to invoke native apps and not with other invokeApplication() calls that is used to invoke with native object(memo/contact).

 

one more thing the i am trying to open the native apps with existing objects (committed). 

 

thanks in advance

 

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

Just to clarify, you say that you are able to get the MemoPad application to invoke with the default arguments, but any attempt to invoke with a new BlackBerryMemo object fails "silently".

 

I still think you may have a foreground focus issue. I have recorded very uneven results from Invoke when the calling application is not in the foreground. Sometimes the Invoked application appears and sometimes it does not. Then, when you re-enter the program by clicking the application icon, the "invoked" application suddenly appears. This applies only if the invoking application is not already in foreground.

 

You migh also want to post your OS and JDE version so that RIM folks can chime in if there is a known issue.

 

Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

yes, you are right i am able to get the MemoPad application to invoke with the default arguments, but any attempt to invoke with a existing BlackBerryMemo object fails "silently".

 

i have tried with all JDE versions i.e greater than 4.2.1.And in all JDE's i am getting same issue.

 

just to clarify, my requirement is to invoke native apps from a dialog screen's button click and i trying to invoking native apps from inside Dialo'gClosedListener's dialogClosed(Dialog dialog, int choice) event.

 

Thanks in advanc

 

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

[ Edited ]

Never tried this exact scenario - this implies that the dialog is modeless, so where was it created from? Is your application still in foreground when the listener is hit? Maybe you should call isForeground() in this listener and verify this.

 

Can you post a more complete code snippet?

  

 

Message Edited by RexDoug on 10-01-2008 03:04 PM
Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: Invoke.invokeApplication() issue ???

Hi All,

 

Can anybody help me on this issue??

 

urgent !!!

 

Thanks in advance..

 

 

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
Administrator
MSohm
Posts: 14,226
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Invoke.invokeApplication() issue ???

Does this issue only occur when you are using the Invoke class from within the dialogClosed method?  Do you see the same behaviour if you override the navigationClick method of the ButtonField?  You could invoke the application from here and then call the close method on the PopupScreen to close it.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.