×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    10

    Question [Ask]My sms app Midlet use native services??

    i got a problem with my native services
    i combine native services with SMSHandler and it get terminate in real device but fine in emulator
    but if i only use smshandler or native services in my exe there's nothing happen
    it happen if i combine this two

    i think it was memory leak

    can anyone help me with my problem,,maybe i got wrong method
    please
    it's for my school project
    thank

  2. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    10

    Unhappy Re: [Ask]My sms app Midlet use native services??

    i use arvind gupta's



    void MainL()
    {
    iSmsHandler = CSmsHandler::NewL(); // here it is
    TUint KTestPort=8100;
    TInetAddr addr(KInetAddrLoop, KTestPort);
    RSocketServ socketServ;
    RSocket listener;
    RSocket blank;
    User::LeaveIfError(socketServ.Connect());
    CleanupClosePushL(socketServ);//if function leaves ensure socket serv session closes
    User::LeaveIfError(listener.Open(socketServ, KAfInet,KSockStream, KProtocolInetTcp));
    User::LeaveIfError(listener.Bind(addr));
    User::LeaveIfError(listener.Listen(1));
    TRequestStatus status;
    TSockXfrLength dummyLength;
    TBool running = ETrue;
    _LIT8(KBadCommand, "Bad command");
    _LIT8(KClosing, "Server closing");
    TBuf8<256> buffer;
    iSmsHandler->setBuffer(buffer); // use it to catch incoming and outgoing sms,,so that's same buffer
    while(running)
    {
    blank.Open(socketServ);
    listener.Accept(blank, status);
    User::WaitForRequest(status);
    if(status != KErrNone) User::Leave(KErrGeneral);
    gConsole->Printf(_L("Accepted connection!!\n"));
    blank.RecvOneOrMore(buffer, 0, status, dummyLength);
    User::WaitForRequest(status);


    blank.Write(buffer, status);
    User::WaitForRequest(status);
    if(status != KErrNone) User::Leave(KErrGeneral);
    blank.Close();
    }

    CleanupStack::Pop(&socketServ);
    socketServ.Close();


    }


    and in E32main

    TRAPD(mainError, DoStartL()); // doStartL is AO then call MAinL
    if (mainError)
    console->Printf(KTextFailed, mainError);
    console->Printf(KTextPressAnyKey);
    console->Getch();

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: [Ask]My sms app Midlet use native services??

    when ever you have appliation crashing , you should get the panic code, it might help on determining what is going wrong: http://wiki.forum.nokia.com/index.ph...ded_panic_code

Similar Threads

  1. MIDlet using socket to talk with c++ app
    By Lord Ryj in forum Mobile Java General
    Replies: 2
    Last Post: 2009-05-14, 15:47
  2. Push Registry SMS doesn't work until MIDlet launched manually once.
    By TimJohns in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2008-02-28, 18:48
  3. SINGING & BUNDLING RECOGNIZER + C++ APP + MIDLET
    By ibraheemJazba in forum Symbian
    Replies: 1
    Last Post: 2007-02-06, 09:15
  4. symbian signed testing problem.
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-01, 10:15
  5. Invoking sms Native app from midlet app?
    By dhanyap in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-11-15, 18:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×