BlackBerry - How to start a messenger application?

霸气de小男生 提交于 2019-12-06 13:35:46

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).

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 :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!