BUG Community

Welcome! Log In

Forums BUG SDK Button Events

Subscribe to Button Events  7 posts, 6 voices

Log in to reply to this topic
 
Sep 12, 2008 8:30am
Img_missing_medium dougk123 2 posts

I would like to use the down and right events of the joystick as well as the far right button click event for input into my application.

Is there a way to intercept these events and prevent them from invoking the bugbase menu?

Currently if my application writes something to the base lcd, it gets overwritten by the menu when these buttons are clicked.

A related request would be to have the menu respect the region I have acquired using IStatusBarProvider. But its still awkward to use the button for one app and have the bug invoke features on another app simultaneously.

Thanks,

Doug

Oct 6, 2008 4:42pm
Img_missing_medium akravets 25 posts

Hey dougk123,

You can disable menuing system altogether by removing com.buglabs.bug.menu bundle from your runtime so that you application consumes all the button events. Similar in the answer to your other post I will see if it will possible to disable/enable menuing system through Configuration Admin.

Again, sorry for the delay in answering your question.

May 26, 2009 3:29am
User_img_not_found_04_med syriven 7 posts

What exactly do you mean, remove it “from your runtime”?

May 26, 2009 11:51am
Medium Bug Labs team bballantine 56 posts

I think akravets means to not allow concierge to run the com.buglabs.bug.menu bundle.  The best way to do this is to remove or comment out the com.buglabs.bug.menu.jar entry from the init.xargs file in /usr/share/java/.  I’ve never tried this before and many things in the BUG java framework use com.buglabs.bug.menu, so I’m not sure if doing this is an awesome idea.

May 27, 2009 11:52am
Medium Bug Labs team bballantine 56 posts

We tried removing the menu bundle and it failed miserably.  Jconnolly is looking into a solution for this now, potentially installing the bundle but not starting it.

May 27, 2009 1:03pm
Medium Bug Labs team jconnolly 285 posts

Follow up, there are a few solutions to this problem of having the menu respond to button events from the joystick and select buttons:

 

You can manually make sure that the menu bundle is not “started”  by altering /usr/share/java/init.xargs, change ”-istart” for com.buglabs.bug.menu.jar to ”-install”

... -istart jslp-bug.jar -istart com.buglabs.osgi.cm.jar #-istart com.buglabs.bug.menu.jar -install com.buglabs.bug.menu.jar ...

You can effectively do the same thing programmatically, though the menu bundle will be started.  You simply stop it.  You’ll need to pass the BundleContext reference into your app, but the code snippet below will show you how to stop the menu bundle, thereby preventing it from responding to ButtonEvents.


Bundle[] bundles = context.getBundles(); for (int i = 0; i < bundles.length; i++){ if(bundles[i].toString().indexOf("com.buglabs.bug.menu") > 0) bundles[i].stop();

Aug 14, 2012 2:04am
User_img_not_found_06_med rubing 103 posts

Isn’t it funny how we www.coachfactorystoreec.com/ Coach Factory Store always want what we can’t have? The girl with the round and pert backside wishes that her rear were 5 times smaller. Meanwhile, the girl with the non existent posterior wishes to achieve a larger butt. Well, if the grass is greener on the other side, just water yours! If you’ve got a small behind, you can create the illusion of a larger one with butt enhancing jeans. Here’s how to do it. Look for light weight denim – This material is very stiff and heavy. If you try to stuff a flat butt into denim jeans, it will only create a flatter looking behind. A little stretch goes a long way – Your butt enhancing