0

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

gnat
  • 6,213
  • 108
  • 53
  • 73
mertaydin
  • 2,184
  • 5
  • 19
  • 26
  • what exactly do you see on the console? Also did you install ApiBridge.sis on the target? – Gorkem Ercan Nov 23 '12 at 06:38
  • There is nothing that going wrong on the telephone screen. I installed ApiBridge.jar. I installed application to my phone Samsung star, application is starting but when I called this codes from my function getCallLog at this time I think application freezes. – mertaydin Nov 23 '12 at 08:07

1 Answers1

1

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.

Gorkem Ercan
  • 3,220
  • 1
  • 18
  • 26