07-30-2008 10:52 AM - edited 07-30-2008 12:06 PM
In the application, we add an application menu item to the phone app screen(the one that shows up when a call is connected) using the MENUITEM_SYSTEM constant, since MENUITEM_PHONE only seems to add the item in the dialing screen. We then use the phonelistener to add and remove the menu item when the event we want gets fired. This works, however there are a couple of problems with this implementation: During multiple simultaneous phone calls(holds, conference) menuitems get added/removed and some persist through our clean up events, and isn't taken off until an uninstall reinstall. After trying a convoluted series of adds/removes through pretty much every event fired in phone listener, the bug still remains. Worse off, it isn't consistent from device to device. Is there a way that when we call our clean up method, that we can do something like:
and when we add a menuitem, to check if it's clear:
if(applicationmenuitem does not exist)
EDIT: I suppose a static int counter can do what I am asking you as well, but is there a built in way to check if an item still remains in the repository(like an id) in case of logic errors?
07-30-2008 02:40 PM