×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Unhappy Problem sending SMS

    Hi,
    I'm trying to send an SMS from 3ed edition phone.

    it works perfectly when I use this API with this application
    But when I try to implement it in my application I get KERN EXEC 3 (null pointer exception).

    I found that the problem is that iSmsMtm is null. It should be initialized after HandleSessionEventL is run, but for some reason it doesn't run.

    I noticed that in SMS3rd.zip the CSmsHandler obhect is simply created using NewL() and it should be ready to use the SendL function.

    I Added the ReadUserData WriteUserData NetworkServices capabilities and msgs.lib smcm.lib gsmu.lib mtur.lib libraries.

    Does anyone had the same problem or have any idea how to solve it?

    Regards,
    Asaf

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: Problem sending SMS

    Probably your HandleSessionEventL has not been invoked yet. Note that most callback methods in Symbian are invoked by active objects, thus they can not be invoked until your method (issuing the OpenAsyncL) returns to the framework. If you need to open the session in synchronous way, use OpenSyncL, and simply move the initializations from HandleSessionEventL after the OpenSyncL line.

  3. #3
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Re: Problem sending SMS

    You really made my day

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    53

    Re: Problem sending SMS

    If you want to use OpenAsynchL().
    ---------------------------------


    I think you are using MMsvSessionObserver, because you mentioned about HandleSessionEvenL();.........

    try this........

    call
    CMsvSession::OpenasynchL(reference To MMsvSessionObserver)
    in your constructL() of the class meant for sending sms.....


    suppose ur class name is CABC.

    now instantiate ur class in constructL() of AppUI class...
    as this
    void xxxAppUi::ConstructL()
    {
    ---
    -----
    CABC::NewL();
    ------
    ----
    }

    There must be another method in CABC class meant for sending sms...

    Typically its name would be CABC::SendL();if u have got it from some sample code

    Now do not call the sendL() anywhere nearby CABC::NewL(); keep a long gap of codes in between. better call sendL() from anywhere but not in constructL() of AppUi....

    Typically u dont need to send sms as soon as an app starts. there
    should be some other processings prior to that..

    Try following this approach and ur app will work with OpenAsynchL() also.....


    Basically the problem, u described occurs because u might have used a code like this.....


    ---
    -----
    CABC::NewL();
    CABC::SendL();
    ----------
    ------
    ----

    Try avoiding this style of usage, if u want to use OpenAsynchL()...

    Otherwise u can also use the OpenSyncL, which I guess u must have already tried....


    But in terms of performance of an app in symbian, I guess its better to use Asynchronous methods as much as possible...


    Check out if my tips work...



    Regards!
    Sandeep Mohapatra

Similar Threads

  1. N91 SMS sending problem
    By markmaya in forum General Messaging
    Replies: 17
    Last Post: 2007-10-01, 18:05
  2. Problem regarding sending sms from pc to mobile
    By Archana. M in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2007-01-10, 05:52
  3. Problem in sending SMS
    By sylvia in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2006-09-27, 07:06
  4. Problem - Sending SMS with Java WMA
    By Geodonis in forum General Messaging
    Replies: 0
    Last Post: 2005-02-01, 11:57

Posting Permissions

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