×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    16

    Where to write code of 'mobile turn off' inside 'sms example'

    Hello there,

    I am a student and for my project have thought of making an application which responds to certain specific SMS Commands sent to a mobile phone.

    For this, I have downloaded the SMS Example provided by Forum Nokia and tried to understand it.
    Now, i have also got the code snippet to fake key presses and enable mobile turn off via an application.
    The problem is - how do i integrate the two things ?
    Where should i write the 'turn of' code snippet in the SMS example ??
    I have checked out the part of the SMS example code in which it recieves and extracts message data, but i do not kow how to proceed with checking the message body for a specific command and then runnning the 'turn off' mechanism.

    Any help from anybody who reads this will be highly appreciated !!

    Thank you.

  2. #2
    Registered User
    Join Date
    May 2007
    Location
    Poland
    Posts
    606

    Re: Where to write code of 'mobile turn off' inside 'sms example'

    Hello,
    You could also try to use this part of code:
    http://wiki.forum.nokia.com/index.php/SMS_Receiver
    http://wiki.forum.nokia.com/index.ph...SMS_from_Inbox

    You have got it commented and you should easily figure out what to do

    Good luck

  3. #3
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Where to write code of 'mobile turn off' inside 'sms example'

    Hello,

    If you have understood the SMS Example I am sure you know what EMsvEntriesCreated means.

    In the following code snippet, I've given you the line where you can read the body of the message.

    Code:
    case EMsvEntriesCreated:
    		{
    			TMsvId* entryId = static_cast<TMsvId*>(aArg2);
    	
    			CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    			if(entries)
    			{
    				CMsvEntry* entry = 0;
    	
    				for(TInt index = 0; index < entries->Count(); index++)
    				{
    					entry = iSession->GetEntryL(entries->At(index));
    					entry->OwningService();
    					CleanupStack::PushL(entry);
    	
    					if(entry->Entry().iMtm == KUidMsgTypeSMS)// Incoming SMS
    					{
    						if ( *entryId == KMsvGlobalInBoxIndexEntryId )  
    						{
    							if(entry->Entry().iDetails.Compare(_L("FromYourConcernedNumber")) == 0)
    							{
    								
    							entry->Entry().iDescription; // This is the body of the message. You can do whatever you want after comparing it to some of your "commands"
    							}
    						}
    					}
    					CleanupStack::Pop(1);
    				}
    			}
    		}
    		break;
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

Similar Threads

  1. Replies: 8
    Last Post: 2009-01-11, 11:19
  2. Mobile learning server / environment published
    By mikaset in forum News and Announcements
    Replies: 0
    Last Post: 2008-03-25, 20:50
  3. Replies: 6
    Last Post: 2007-11-20, 13:09
  4. Replies: 0
    Last Post: 2007-07-15, 23:06
  5. sending sms from pc to mobile using datacable
    By kunjankapadia in forum General Messaging
    Replies: 0
    Last Post: 2005-05-21, 07:00

Posting Permissions

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