BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   RIM Software (http://www.blackberryforums.com/forumdisplay.php?f=13)
-   -   integrate my RIM app with BB (http://www.blackberryforums.com/showthread.php?t=203779)

sonia1986 09-10-2009 04:55 AM

integrate my RIM app with BB
 
Hello
How to integrated RIM app with BlackBerry Address Book.For example:-send an SMS message by selecting a contact, pressing the menu button, and choosing to SMS via XYZ app.

s.selva 09-10-2009 05:14 AM

You can add a menuItem into the SMS editor menu and call the function you want to do how to send the SMS :

Code:

public void registerMenu(){
    ApplicationMenuItemRepository.getInstance().addMenuItem(
    ApplicationMenuItemRepository.MENUITEM_SMS_EDIT, new SendSMS(30)
    );
}

[...]

private class SendSMS extends ApplicationMenuItem{
       
        public SendSMS(int order){
            super(order);
        }
       
        public String toString(){
            return "Send SMS Like Me";   
        }

        public Object run(Object context) {
            // what you want to do
        }
}


sonia1986 09-10-2009 05:26 AM

Quote:

Originally Posted by s.selva (Post 1468737)
You can add a menuItem into the SMS editor menu and call the function you want to do how to send the SMS :

Code:

public void registerMenu(){
    ApplicationMenuItemRepository.getInstance().addMenuItem(
    ApplicationMenuItemRepository.MENUITEM_SMS_EDIT, new SendSMS(30)
    );
}

[...]

private class SendSMS extends ApplicationMenuItem{
       
        public SendSMS(int order){
            super(order);
        }
       
        public String toString(){
            return "Send SMS Like Me";   
        }

        public Object run(Object context) {
            // what you want to do
        }
}


Hii
Thanks s.selva!
cud u plz send me links related to that bcoz i m new in RIM BB Api.
I was working with J2me first time i m developing for BB handset..

sonia1986 09-10-2009 06:32 AM

Hello
I think MenuItem is used to create an Menu in my own app but i want name of my app(eg. Send SMS via my App) in native address Book of BB handset.Is it possible?
Plz reply soon..

s.selva 09-10-2009 07:29 AM

i think that you can add a MenuItem in the differents menus of the phone :

Code:

// In AddressBook list
ApplicationMenuItemRepository.getInstance().addMenuItem(
            ApplicationMenuItemRepository.MENUITEM_ADDRESSBOOK_LIST, new SendSMS(30)
);
// In AddressBook card
ApplicationMenuItemRepository.getInstance().addMenuItem(
            ApplicationMenuItemRepository.MENUITEM_ADDRESSCARD_VIEW, new SendSMS(30)
);
// In the call logs
ApplicationMenuItemRepository.getInstance().addMenuItem(
            ApplicationMenuItemRepository.MENUITEM_PHONE, new SendSMS(30)
);


s.selva 09-10-2009 08:25 AM

You can find all functions of RIM library into the JDE (Help > API reference).

sonia1986 09-11-2009 03:01 AM

1 Attachment(s)
Thanks a lot
i send you an image in that full menu window i need name of my BB java app..is it possible?

s.selva 09-11-2009 04:24 AM

Quote:

Originally Posted by s.selva (Post 1468784)
i think that you can add a MenuItem in the differents menus of the phone :

Code:

// In AddressBook list
ApplicationMenuItemRepository.getInstance().addMenuItem(
            ApplicationMenuItemRepository.MENUITEM_ADDRESSBOOK_LIST, new SendSMS(30)
);
// In AddressBook card
ApplicationMenuItemRepository.getInstance().addMenuItem(
            ApplicationMenuItemRepository.MENUITEM_ADDRESSCARD_VIEW, new SendSMS(30)
);

// In the call logs
ApplicationMenuItemRepository.getInstance().addMenuItem(
            ApplicationMenuItemRepository.MENUITEM_PHONE, new SendSMS(30)
);


I give it to you.

sonia1986 09-18-2009 02:06 AM

Quote:

Originally Posted by s.selva (Post 1469353)
I give it to you.

Hello..thanks s.selva..i did it...I am able to append menu in contact book but when i clicked on that its unable to open my application...can u plz help me how to invoke my app..


All times are GMT -5. The time now is 05:16 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.