BlackBerry - How to start a messenger application?

2019-05-23 07:16发布

问题:

I would like to use gtalk or any other messenger in my application but i don't know how to do this.can u please give me idea about how to solve this one.if u can provide me some web link to know more about this.

回答1:

BB KB - How To - Launch a third-party application from another third-party application
Try this for standard BB Messanger:

    int mh = CodeModuleManager.getModuleHandle("net_rim_bb_qm_peer");
    if (mh == 0) {
        try {
            throw new ApplicationManagerException(
                    "BB Messanger isn't installed");
        } catch (ApplicationManagerException e) {
            System.out.println(e.getMessage());
        }
    }
    ApplicationDescriptor ad = CodeModuleManager
            .getApplicationDescriptors(mh)[0];
    ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, null);
    try {
        ApplicationManager.getApplicationManager()
                .runApplication(ad2, true);
    } catch (ApplicationManagerException e) {
        System.out.println(e.getMessage());
    }

You can start any other app by module name, just replace

"net_rim_bb_qm_peer"

UPDATE And if you want examples of blackberry open source messengers, see:
BlackChat - ICQ chatting software
jmIrc - IRC MIDlet for mobile phones
WLIrc - IRC Client for Java cell phones or any other device who support java MIDP 1.0 (j2ME).



回答2:

If you are also interested in developing on Android or iPhone platforms, you can build on top of Kik Messenger using Kik API. It lets you to piggyback rich media content and files over the Kik's own transport. The API itself is very simple to use - about 5 lines of code are needed to integrate it into your app. You may give it a shot here: http://www.kik.com/dev

Disclaimer: I am one of the developers behind Kik API :)