Send the menu item for OS6

Hey, help me please...

I sendmenu sourcecode of blackberry Web site, I try to my BB tour 2 (9650) with operating system version 6 does not work...

import net.rim.blackberry.api.sendmenu.*;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.XYEdges;
import net.rim.device.api.ui.component.EditField;
import net.rim.device.api.ui.component.Menu;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.decor.BorderFactory;

import org.json.me.JSONException;
import org.json.me.JSONObject;

public class SendMenuAPIDemo extends UiApplication
{
    public static void main(String[] args)
    {
        SendMenuAPIDemo theApp = new SendMenuAPIDemo();
        theApp.enterEventDispatcher();
    }

    public SendMenuAPIDemo()
    {
        pushScreen(new SendCommandDemoScreen());
    }
}

class SendCommandDemoScreen extends MainScreen
{

//In the screen class, declare instance variables to represent
//an edit field and the text that the user types in this field.
    private EditField _textToSend;
    private String _textString;

    public SendCommandDemoScreen()
    {
        setTitle("Send Menu API Demo");

//In the screen constructor, create a new EditField object to represent
//the field that the user types in.
        _textToSend = new EditField("Send: ", "Type the text to send here",
                                    255, Field.FIELD_HCENTER);

//To specify the appearance of the EditField object, invoke setBorder(),
//setPadding(), and setMargin(). In this example, a bevel border is created
//for the EditField object, and a padding area and margin area are added.
        _textToSend.setBorder(BorderFactory.createBevelBorder(new XYEdges(3, 3, 3, 3)));
        _textToSend.setPadding(8, 8, 8, 8);
        _textToSend.setMargin(15, 15, 15, 15);

//Add the EditField object to the screen.
        add(_textToSend);
    }

//Override makeMenu() of the MainScreen class.
    protected void makeMenu(Menu menu, int instance)
    {

//Invoke super.makeMenu() to add the default menu items for BlackBerry
//device applications to the menu.
        super.makeMenu(menu, instance);

//Invoke getText() of the EditField class to retrieve the text that
//the user typed in the edit field.
        _textString = _textToSend.getText();

//Create a new JSONObject object to represent the context
//information for the Send menu.
        JSONObject context = new JSONObject();

//In a try/catch block, invoke put() of the JSONObject object to populate
//the context information using key-value pairs. Use the constants that
//are defined in the SendCommandContextKeys class as keys. Catch a
//JSONException, which indicates that the specified key is null.
        try
        {
            context.put(SendCommandContextKeys.TEXT, _textString);
            context.put(SendCommandContextKeys.SUBJECT, "Your Text");
        }
        catch (JSONException e)
        {
            System.out.println(e.toString());
        }

//Create an array of SendCommand objects to represent the Send menu commands
//that you want to include in the Send menu. Invoke
//SendCommandRepository.getInstance() to retrieve the singleton instance of the
//SendCommandRepository. Invoke get() and specify as parameters the type of content
//to send, the context information for the content, and a boolean value
//that indicates whether all of the commands should be retrieved
//regardless of whether their associated applications can be opened.
        SendCommand[] sendCommands = SendCommandRepository.getInstance().get(
                                         SendCommand.TYPE_TEXT, context, false);

//Determine whether the array of SendCommand objects is not null and
//contains commands, and if so, create a new SendCommandMenu object to represent
//these commands and add it to the menu.
        if (sendCommands != null && sendCommands.length > 0)
        {
            menu.add(new SendCommandMenu(sendCommands, 0, 0));
        }
    }
}

Help me please, when I opened there is always a view from menu error: Module 'net_rim_bbapi_sendmenu' not found.

API said "since 7.0', you will not be able to use the OS 6.

Tags: BlackBerry Developers

Similar Questions

  • Add the menu item for the sequence of batch processing?

    Hello

    I created a folder level script that runs at startup of Acrobat. The script adds a menu item, that when clicked, calls another function.

    I wonder if I can create a batch sequence and add a menu item for that also? I mainly want to avoid going through the whole advanced-> processing statement->... Processing batch-> find the command sequence, and then click Run.

    I've seen a lot of examples for adding menu items that call the folder level scripts, but nothing about batch sequences. Has anyone already done this?

    Thanks in advance!

    You cannot create an element of a sequence of commands menu. Nearest you

    can get is to open the batch sequences window, using the execMenuItem()

    method and "BatchEdit" as the name of the command (I'm not sure that it is still

    the same in Acrobat X).

  • How to a add a menu item for the depeneding menu existing email on the subject of the e-mail?

    Hi all...

    I'm new here and I need your help... Please

    I'm trying to add the menu item to the email existing menu depeneding on the email... I assumed using

    ApplicationMessageFolderRegistry togather with shops and Session but could not establish the code...

    any help please...

    Thank you

    Please mark the topic as solved, then.

  • Add the menu item to app mail as the mail message?

    Hello

    I know how to add menu items in the mail application, but can I add one, according to the mail message? I want to send a single something in an email and after that one of my applications.

    Is it possible to do? Perhaps a listener?

    Thank you

    Matthias

    Hello Matthias.

    Well, if I understand your message, it's that - you send mail with unique label or message (something unique added with the text of the message) and you want to add the menu item when a user opens the message.

    According to my understanding - I have a solution.

    We have a listener "VeiwExtendedListener", that provide notifications for new, open, close, reply, and forward.

    You can implement this listener and to open(), you get the instance of the message object, which is open.  With this object message get the content of the message, locate the tag unique in the text of the message, if it is in the message, and then add your menu item.

    I hope this will help

    Good luck

    -Nidhi

  • Is there a way to get the submenu above the menu item?

    I'm creating a digital magazine I need to a menu at the bottom with a drop-down list for the pages, which I obviously need this submenu to go up because the menu is at the bottom.

    I was playing with the settings but I can't seem to make it work. I forgot something, or it's just not as simple as that?

    Arviage,

    Yes, you can accomplish a submenu "move up", but not by using a typical submenu item. Create your menu down as you normally would, but your submenu in the context of a widget of composition and place the transparent trigger on the menu item that you want to appear.

    Follow this video (starting 16 minutes) and see if that helps - it should show you how to create the submenu of the composition and to your application, simply let you shoot at the bottom of the composition to create the effect of "moving upwards":

    Muse Jam Sessions_97_MuseFall2013

    If it doesn't make sense, let me know and I can send along a video of doing me this feature myself.

    -Emily

  • Messages arrive, but the "Inbox" or any other folder open even if the content still there (and almost all the menu items do not work)!

    Using last Thunderbird on Windows 7. Had problems with the operating system and had to use a system restore. When I opened TB, it displays the folders in the left pane, but the credits of "Thunderbird Mail-...» "and the 3 topics: E-mail; Accounts; and advanced features. None of the files would open. I used the "Search messages" function and has been able to show existing and new messages in the 'Inbox '. Also wanted to know if files are always in my 'profile'... and they were all there where they should be. (And almost all the menu items are disabled).
    I wonder if I need to reinstall Thunderbird... maybe the OS issues this morning - and restore - have corrupted or damaged key elements of the program?
    Thank you...

    System Restore is not always a very good thing for applications.

    Reinstall is unlikely to help. But if your accounts are all imap and that you do not have a lot of other data (address book, for example) in Thunderbird, you could start from scratch.

    But before that, you should try Thunderbird started in SafeMode https://support.mozilla.org/en-US/kb/safe-mode-thunderbird

  • What is the menu item "Bring everything to the front ', and how to use it?

    What is the menu item "Bring everything to the front ', and how to use it?

    It's a selection in the window menu and means to bring all open windows of this application at the front and push all the windows open for other applications behind. This makes access to the easiest application windows. However, if you don't have that one window open in an application, then the menuitem does nothing.

  • Disable the menu item in the third party application (such as Photoshop)

    Please suggest me to disable the menu item in the third party application (such as Photoshop).

    Hello

    I suggest you to send your query to the following link:

    Photoshop Help Center: http://www.adobe.com/support/photoshop/

    Hope this information is useful.

  • the menu item run method not called

    Eclipse SDK Version: 3.4.1

    BlackBerry JDE plugin for Eclipse Version: 1.0.0.50

    BlackBerry JDE component package Version: 4.5.0.14

    I added a menu item to the contacts list. I would like to get the context when the user clicks the menu item, but the run method is not entered. When the user clicks the item in the menu the main routine is entered with correct arguments. Should not called run with the context method? No exception is thrown.

     

    Import net.rim.blackberry.api.menuitem.ApplicationMenuItem;
    Import net.rim.blackberry.api.menuitem.ApplicationMenuItemRepository;
    Import net.rim.device.api.system.Application;
    Import net.rim.device.api.system.ApplicationDescriptor;

    SerializableAttribute public class BwMain extends Application {}
    private static final long APP_ID = 0xf46f5a7867d69ff0L;
    private static final String ARG_LAUNCH_BW = "1";

    public BwMain() {}
    long menuItemLocation = ApplicationMenuItemRepository.MENUITEM_ADDRESSBOOK_LIST;
    ContactsBwMenuItem menuItem = new ContactsBwMenuItem();
    ToolBarMenuButton.AddMenuItem (menuItemLocation, ARG_LAUNCH_BW, menuItem);
    System.Exit (0);
    }

    Public Shared Sub main (String [] args) {}
    If (args == null | args.length == 0) {}
    BwMain bwMain = new BwMain();
    bwMain.enterEventDispatcher ();
    }
    else {}
    System.out.println ("App launched from the menu");
    }
    }

    private public static Sub ToolBarMenuButton.AddMenuItem (long location, String argOfAppl, ApplicationMenuItem appMenuItem) {}
    Amir ApplicationMenuItemRepository = ApplicationMenuItemRepository.getInstance ();
    ApplicationDescriptor app = ApplicationDescriptor.currentApplicationDescriptor ();
    app = new ApplicationDescriptor (app, new String [] {ARG_LAUNCH_BW});
    amir.addMenuItem (location, appMenuItem, app);
    }

    private static class ContactsBwMenuItem extends ApplicationMenuItem {}
    {ContactsBwMenuItem()}
    Super (20);
    }

    public String toString() {}
    return "PC connection";
    }

    public Object execute (object context) {}
    try {}
    System.out.println ("input run method");
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    Returns a null value.
    }
    }
    }

    You call system.exit() in the Builder before entering the EventDispatcher. I'm guessing that you add the menu item, but leave the application, and when the menu item is called it is more a reference to the context of the application and decides not to continue. The menu item will not remove itself when the application closes.

  • Failed to add the menu item «Edit adjustment...» "action

    Hello

    I have an action in which I want to change an existing adjustment layer. I can't save the menu item «Edit adjustment...» "in the drop down palette layers.

    To add the step, I tried the following steps:

    1. Select the adjustment layer thumbnail icon
    2. Select «Insert Menu Item»... "in the menu palette flyout
    3. Choose "Edit settings...". "in the menu of the layers palette (how the window insert a Menu item" Menu item: layers: change the setting ")
    4. Press the OK"" button.

    This adds nothing to the action; usually, hit OK adds the menu item.

    I'm doing this right? Is this a known bug? As a solution, can someone point me to action with the step of "Edit settings...". "already in there? Thank you.

    Photoshop CC 2015.1.2 (20160113.r.355 x 64)

    Mac OS X 10.11.3

    I think that you make it harder than it is.  Just record the action and adjust the adjustment layer, you add during the recording of the action.  When did you record the action you should see that there two steps were recorded for the adjustment layer, you added during the recording of the action. "Do adjustment layer" and "current adjustment layer Set.  Insert a stop message with continue after the "make the adjustment layer ' step and check activate the dialog box in step"Set current adjustment layer".»  Layer when allowed by using the action, you can uncheck the walk of the stop.

  • The menu items are reversed in Tablet and mobile display

    I don't know what went wrong with the Web site, www.cebumerchants.com, the menu items are reversed in the mobile and view tablet, but not for the office.

    Can someone please take a look? I need to solve this problem.

    This one is pretty simple. You use float: right on your query support desktop and float: left for the little ones to your selector "nav li '...

  • Question about the menu item displays do not correctly the status of 'active '.

    Hello

    I've reproduced for purposes of training "Influence," tutorial site

    and my questions are the following:

    As you can see on the site

    Homepage 

    (1) the order of top menu contact us, has the same features as the other components (speakers, time and place) - see picture attached.

    However, when the user clicks about us contact.

    the menu item is not barred to the outside like any other.

    I checked the condition of the assets is correct.

    The anchor link is placed on the foot of page, designed on the page A-master separately from the Home Page.Active.JPG

    I tried to place the anchor to the Home Page at the last point before the beginning of footer, but no result.

    (2) also if you do a simple test, you will see that by clicking on the heading "Contact us", the menu Time & Place is highlighted

    and if you click on the 'Top' menu, or if you are in "Time and place" content and you click on 'Top', the 'Speakers' menu is also highlighted.

    Please note that this behavior is also indicated to the site of origin INFLUENCE ...

    What I am doing wrong?

    BR

    Nektarios

    Replied here: https://forums.adobe.com/thread/2063776

  • How to highlight the menu item based on the position of the scrolling page?

    Hello

    I am interested by learned how to achieve the effect in the upper left corner of this Web page:

    http://trashpixels.co/#one

    When you click on any of the six gray menu icons (grey rectangles), you scrolled down to the deep page and arrive at the location one or two or four or what you clicked on... it's easy. But how do I get the menu item (a rectangle) to be highlighted (change to green) to indicate the current position on the web page?

    Any suggestion would be appreciated

    Thank you

    Bradley

    Hi Bradley

    You can use the anchor links for menu items that would be would be the active state once that section of the specific page of scrolling.

    This video explains the process:

    https://www.YouTube.com/watch?v=qNsI6DHz5Co

    Thank you

    Sanjit

  • my muse site, the menu item will not open unless you press twice

    On my version Tablet and phone of my muse site, the menu item does not open except if you press two times the menu item. This happens only on the menu items that have submenus. Help, please! Thank you!

    Thank you for posting.

    This is the default behavior of the tablet or mobile devices. When press once, the submenu opens, and when you tap again once, the menu items opens. Please let me know if I'm missing something. In addition, please provide us with the URL of the site if you need help.

    Kind regards

    Aish

  • No space under the menu item

    During a flight over a menu item, the item becomes red.  However, you can still see a bit of the yellow background along the bottom.  Can someone tell me what I need to trouble getting the red box to fill the space?  Thank you.

    menuBar.jpg

    @charset "UTF-8";

    / * Sections - version 0.6 - Pre - Release Spry 1.6.1 * /.

    / * Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

    /*******************************************************************************

    The AVAILABLE INFORMATION: Describes the box model, positioning, the order

    *******************************************************************************/

    / * The outermost container for the menu bar, an area of width auto without margin or padding * /.

    UL. MenuBarHorizontal

    {

    margin: 0;

    padding: 0;

    list-style-type: none;

    cursor: default;

    Width: 960px;

    Police: bold;

    }

    / * Value of the menu bar active with this class, currently the definition of z-index to accommodate IE rendering bugs: http://therealcrisp.xs4all.nl/Meuk/IE-zindexbug.html */

    UL. MenuBarActive

    {

    z-index: 1000;

    }

    / * Menu item containers, position of children relative to this container and are a fixed width * /.

    UL. MenuBarHorizontal li

    {

    margin: 0;

    padding: 0;

    list-style-type: none;

    do-size: 100%;

    position: relative;

    text-align: inherit;

    cursor: pointer;

    Width: 160px;

    float: left;

    border: 0;

    }

    / * Submenus should appear under their parent (top: 0) with a higher z-index, but they are first the left side of the screen (-1000em) * /.

    UL. MenuBarHorizontal ul

    {

    margin: 0;

    padding: 0;

    list-style-type: none;

    do-size: 100%;

    z index: 1020;

    cursor: default;

    Width: 160px;

    position: absolute;

    left:-1000em;

    }

    / * Submenu that shows with the designation of the class MenuBarSubmenuVisible, we put the car left so it happens on the screen below its parent menu item * /.

    UL. MenuBarHorizontal ul. MenuBarSubmenuVisible

    {

    left: auto;

    text-align: left;

    }

    / * Container of menu items are same fixed width parent * /.

    UL. MenuBarHorizontal ul li

    {

    Width: 160px;

    }

    / * Submenu that shows with the designation of the class MenuBarSubmenuVisible, we have left to 0, it is on the screen * /.

    UL. MenuBarHorizontal ul. MenuBarSubmenuVisible ul. MenuBarSubmenuVisible

    {

    left: auto;

    top: 0;

    }

    / * Menu items are a light grey block with padding and no text decoration * /.

    UL. MenuBarHorizontal a

    {

    display: block;

    cursor: pointer;

    background-color: #f6ead6;

    Padding: 0.5em 0.75em;

    Color: #333;

    text-decoration: none;

    }

    / Components menu that have mouse over or focus have a blue background and white text * /.

    UL. MenuBarHorizontal a: hover, ul. MenuBarHorizontal a: focus

    {

    background-color: #80290e;

    color: #FFF;

    }

    / * Menu items that are opened with the submenus are on MenuBarItemHover with a blue background and white text * /.

    UL. MenuBarHorizontal a.MenuBarItemHover, ul. MenuBarHorizontal a.MenuBarItemSubmenuHover, ul. MenuBarHorizontal a.MenuBarSubmenuVisible

    {

    background-color: #80290e;

    color: #FFF;

    }

    /*******************************************************************************

    Submenu INDICATION: styles if there is a submenu in a given category

    *******************************************************************************/

    / * Menu items that have a submenu have the MenuBarItemSubmenu class designation and are set to use a positioned background the far left (95%) and vertically centered image (50%) * /.

    UL. MenuBarHorizontal a.MenuBarItemSubmenu

    {

    background-image: url (SpryMenuBarDown.gif);

    background-repeat: no-repeat;

    background-position: 50 95%;

    }

    / * Menu items that have a submenu have the MenuBarItemSubmenu class designation and are set to use a positioned background the far left (95%) and vertically centered image (50%) * /.

    UL. MenuBarHorizontal ul a.MenuBarItemSubmenu

    {

    background-image: url (SpryMenuBarRight.gif);

    background-repeat: no-repeat;

    background-position: 50 95%;

    }

    / * Menu items that are opened with the submenus have the designation of the MenuBarItemSubmenuHover class and are set to use a background image "hover" positioned on the far left (95%) and centered vertically (50%) * /.

    UL. MenuBarHorizontal a.MenuBarItemSubmenuHover

    {

    background-image: url (SpryMenuBarDownHover.gif);

    background-repeat: no-repeat;

    background-position: 50 95%;

    }

    / * Menu items that are opened with the submenus have the designation of the MenuBarItemSubmenuHover class and are set to use a background image "hover" positioned on the far left (95%) and centered vertically (50%) * /.

    UL. MenuBarHorizontal ul a.MenuBarItemSubmenuHover

    {

    background-image: url (SpryMenuBarRightHover.gif);

    background-repeat: no-repeat;

    background-position: 50 95%;

    }

    /*******************************************************************************

    BROWSER HACKS: hacks below should not be changed, unless you are an expert

    *******************************************************************************/

    / * HACK FOR IE: to ensure that sub menus show above form controls, underpin us each submenu with an iframe * /.

    UL. MenuBarHorizontal iframe

    {

    position: absolute;

    z index: 1010;

    Filter:alpha(opacity:0.1);

    }

    / * HACK FOR IE: to stabilize the appearance of the menu items. the slash in the float is to keep IE 5.0 analysis * /.

    @media screen, projection

    {

    UL. MenuBarHorizontal li. MenuBarItemIE

    {

    display: inline;

    f\loat: right.

    Background: #FFF;

    }

    }

    Looks like it was just a little minor additional coding. Remove the height of line here. Seems to fix for me.

    a: hover, a: active, a: {emphasis

        line-height: 1.2;

    text-decoration: none;

    }

Maybe you are looking for