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
Developer
GeekyDad
Posts: 56
Registered: ‎07-15-2008
My Device: Not Specified

ApplicationMenuItem and Context Object... Broken?

I have an ApplicationMenuItem on the SMS app menu using MENUITEM_SMS_VIEW and MENUITEM_SMS_EDIT. I am seeing some crazy inconsistencies with the context object that is being passed to the menuitem's run method. Here are some examples of what I'm finding when my menu item is invoked:

 

- 8320 running OS 4.2.2.16:

  • Composing a brand new SMS:  The ApplicationMenuItem is passed a context object that is null.
  • Composing an SMS from a saved draft:  The ApplicationMenuItem is passed a perfectly populated TextMessage object.
  • Replying to a received SMS:  The ApplicationMenuItem is passed a TextMessage with the proper address but the wrong payload text. It contains the text of the received SMS, instead of the text of your reply that you just typed.

 

- 8130 running OS 4.3.0.59

  • Works properly for all.

 

- 8130 running OS 4.3.0.60

  • One revision later, and everything is broken again and behaves like the issues stated in OS 4.2.2.16.

 

- 8330 running OS 4.5.0.77

  •  Works properly for all.

 

- 9530 running OS 4.7.0.75

  • Composing a brand new SMS:  The ApplicationMenuItem is passed an unpopulated TextMessage object. Address is empty and payload text is empty despite what was typed.
  • Composing an SMS from a draft:  The ApplicationMenuItem is passed a perfectly populated TextMessage object.
  • Replying to a received SMS:  The ApplicationMenuItem is passed a TextMessage with the proper address but an empty payload text despite there being text you have typed within the reply.

 

I'm assuming the inconsistencies are due to bugs. Is that correct? And if so, does anyone know if/when these will be fixed? I'm especially interested in a fix for OS 4.7.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: ApplicationMenuItem and Context Object... Broken?

the context object being null is, unfortunately, a very common problem and rim does not seem to be able to fix it consistently (or it is not high enough on their priority list).

if you use an applicationmenuitem in the phone application you get even more context objects as null.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: ApplicationMenuItem and Context Object... Broken?

I agree with Simon on this. We have a couple of products which rely on this feature, and we are definitely shooting at a moving target. There are inconsistencies from application to application, and from release to release.
Developer
GeekyDad
Posts: 56
Registered: ‎07-15-2008
My Device: Not Specified

Re: ApplicationMenuItem and Context Object... Broken?

Thank you, Simon and Rex, for your replies. I was afraid that would be the answer I received. This type of conclusion is all too common among these forums. I've been developing for the BlackBerry platform for less than a year, and I've been utterly dumbfounded by the half-baked and frustratingly limited API put-out by RIM. Using the ApplicationMenuItem class is one of the only means by which we can hook-into their built-in apps and achieve some sense of fluidity. For it to be so inconsistent, and for the most part, broken in most of their OS versions, is just inexcusable. I sure hope this type of API negligance is improving. I can't imagine it being much worse.

 

Rex, since you have products which rely on this broken feature, how do you deal with it? Telling the end-user that it's a bug in RIM's API is certainly not going to make them any less frustrated toward your product. How do you code around something like this when there's no other way to access the information that, according to their documentation, is supposed to be passed to your run method?

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: ApplicationMenuItem and Context Object... Broken?

For most of these, we just post work-arounds in our product forum. There really isn't much more to do. We used to advocate OS upgrades, but we had several folks who went from 4.3 to 4.5 (to work around issues with the call long), and wound up being completely unsatisfied with the new release for other reasons. So we stopped doing that. We just note (for folks who report the issue) that "such and such was fixed by RIM on such and such release".

 

I agree that it is frustrating. The response like "this was fixed in 4.5.0.178" - is not accepted by 90% of folks who never upgrade their phones. It is basically like saying "live with it".

 

All of our software runs in trial mode for a couple of weeks, so people either live with the work-arounds, or they let the trial expire.

 

 

 

 

 

 

 

 

 

 

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: ApplicationMenuItem and Context Object... Broken?

In my opinion it is a good idea to make the code interactive. if you fail to obtain a context object you can notify your user that he has to enter the value manually. Accordingy to my experience it is less annoying for the user then something not working. In the manual this should be mentioned as an issue that can/may be fixed with an OS upgrade.

Personally i am quite contempt with the RIM API, this is one of the few points they continue to fail though.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
GeekyDad
Posts: 56
Registered: ‎07-15-2008
My Device: Not Specified

Re: ApplicationMenuItem and Context Object... Broken?

Thanks again to both of you for your insight. This really is unfortunate as it makes the experience much worse for the end user, not to mention the frustration for developers who have to try and compensate for it in other ways.

 

I just had someone test this on OS 4.7.0.114 and it is still broken. So, what is the proper way of submitting these bugs to RIM and requesting a fix? I'm sure they know about it, but how can I make my voice heard to try and get this on their radar? What is the proper procedure?

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: ApplicationMenuItem and Context Object... Broken?

Thank you for providing the detail error report.  I have been able to reproduce this behaviour and have sent the issue to our development team.
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
Developer
GeekyDad
Posts: 56
Registered: ‎07-15-2008
My Device: Not Specified

Re: ApplicationMenuItem and Context Object... Broken?

I appreciate your response, Mark. Is there any way I can track the progress of this issue to know when a fix might be available? If not, then what about a change log for each OS release and the API issues that were addressed? Is there any such thing available to us?

 

Thank you for verifying this issue and submitting it to the dev team.