java-mesmss60

How can i get call log in JavaME by ApiBridge?


I'm trying to read SMS inbox with JavaME. I tried ApiBridge, reserached the developer.nokia and I found some examples. I tried examples but i think code doesn't get the call log, just looping.

Thanks for your helps.

Here is my sample code.

 APIBridge bridge = APIBridge.getInstance();
        bridge.Initialize(this);

        final LoggingService service = (LoggingService)bridge.createService("service.logging");
        formum.append("Başlıyor\n");
        Thread thread = new Thread() {

            public void run() {
                try {
                    BridgeResult res = service.GetList();
                    Vector returnValues = (Vector) res.getReturnValue();
                    String out = "Result: \n";

                    for (int i = 0; i < 2; i++) {
                        System.out.println("BridgeResult CallLog");
                        Hashtable item = (Hashtable) (returnValues.elementAt(i));
                        out += "PhoneNumber: " + item.get("PhoneNumber").toString() + "\n";

                    }

                    formum.append(out);                                   
                } catch (BridgeException ex) {
                    tbox.setString("Bridge error occured - unable to retrieve data. " + ex.getMessage());
                } catch (Exception ex) {
                    tbox.setString("General error occured - unable to retrieve data. " + ex.getMessage());
                }


            }
        };

        thread.start();

And the sample code is here : http://www.developer.nokia.com/Community/Wiki/J2ME_Api_Bridge_Interface


Solution

  • API Bridge API is a Symbian specific solution which requires you to install both a native Symbian application the /APIBridge Installer/APIBridge_v1_1.sis on the downloaded zip. The APIBridge.jar works against the interfaces provided by APIBridge_v1_1.sis.

    Since this is a Nokia Symbian specific solution it does not work for other mobile OSes and manufacturers.