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
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Placing button in camera screen

Is it possible to add menus or button on camera screen?

Like two on the top on left and right and two in the bottom?

Please use plain text.
Developer
developer_aman_arora
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Placing button in camera screen

[ Edited ]

menus can be added read this link for that


http://www.blackberry.com/developers/docs/6.0.0api/net/rim/blackberry/api/menuite/ApplicationMenuIte...

 

 use this method to add menu

 

public void addMenuItem(long id,
                        ApplicationMenuItem item,
                        ApplicationDescriptor application,
                        Object context)
Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Placing button in camera screen

Hey the above link is showing error.

But is it possible to place the menu on the camera screen in BB6?

Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Placing button in camera screen

Here is a link to the online documentation for OS 6.0.

 

http://www.blackberry.com/developers/docs/6.0.0api/

 

Look in here at ApplicationMenuItem and ApplicationMenuRepository. 

MENUITEM_CAMERA_PREVIEW seems to be the one for you. 

 

Further information on using these is available on this forum. 

Please use plain text.
Developer
developer_aman_arora
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Placing button in camera screen

ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance();
int placement = 0x350100; // don’t just use 0
ApplicationMenuItem ami = ApplicationMenuItem(placement) {
public Object run( Object context )

{

// do something

}
public String toString()

{

return “Click”;

}
};
amir.addMenuItem(ApplicationMenuItemRepository.MENUITEM_CAMERA_PREVIEW , ami);

 

use this code and that code in run() method which u want to do on that menu item clicked

Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Placing button in camera screen

Hey where do i add this code in my app??

 

This is the option that i want to add to one of my  button that i placed on camera screen. How can i do this??

 

protected void makeMenu(Menu menu, int instance) {
        // TODO Auto-generated method stub
        
        menu.add(new MenuItem("Help",10,10) {
            
            public void run() {
                // TODO Auto-generated method stub
                synchronized (UiApplication.getEventLock()) {

                    UiApplication.getUiApplication().pushScreen(new Help());
                }

            }
        })

}

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Placing button in camera screen

You have added a button to the camera screen?

 

I didn't think that was possible, which is why you hae pointed at the menu option using ApplicationMeniItems. 

Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Placing button in camera screen

So it means in blackberry its not possible to place button on camera screen??

Please use plain text.
Developer
rishikeshsinghpbh
Posts: 121
Registered: ‎05-31-2012
My Device: 9900
My Carrier: Airtel

Re: Placing button in camera screen

Yes, you can not place a button on camera screen but you can do a workaround of your requirement.

e.g the option you want to show on camera screen, show that options on a popup which will be displayed when you perform some action on the camera screen and before saving the picture.

OR adding those options to menu is also a good option.

 

Thanks.

Rishikesh Singh
Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Placing button in camera screen

Actually i have to place the button on camera screen and perform action on clicking of that button.

Is it possible in higher version of bb?

Please use plain text.