locked
Is it possible to intercept an sms, prevent the standard notification from appearing and still save it in the Inbox? RRS feed

  • Question

  • I use sms interception in my mobile app. I am able to intercept the messages i need without a problem, however I noticed there are only two options in the compact framework: 'Notify' and 'NotifyAndDelete'. If I use 'Notify', after the message is intercepted, the standard text message notification appears right after, which is not good because the point of me intercepting the message is so i can display it in a custom form with whatever formatting i need.

    However, if I use 'NotifyAndDelete' it will prevent the standard interception mechanism from getting this message, but it will also prevent it from being saved in the 'Messaging' inbox.

    My question is this: Is it possible to intercept a text message, prevent the standard notification and still have it save in the messaging inbox? And if so How??

    Thanks ahead of time
    Thursday, July 30, 2009 10:34 PM

Answers

  • Hi Mike,

    In addition to JenniFer's reply,  I have two other ways to implement the function:

    1. Once we  intercept SMS via SNAPI, we can use RemoveNotification API to remove the notification. For more information, see this thread:
    http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/eac0d78d-5217-48c4-afca-cd7fc38712bc/

    2. Once we  intercept SMS via SNAPI, we can find the notification window using FindWindow, then hide it using ShowWindow


    I don't try it, please try it yourself.



    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, August 3, 2009 8:22 AM
  • Hi Mike,

     

     

    If you want to disable all the incoming sms notification display, go through the following steps manually.:

     

    Start->Settings->Sounds&Notifications

    In the"Notifications" tab and disable  the "display messages" checkbox for "Messaging: New text message”

     

    Or the following article shows how to remove notification programmatically

    http://www.codeproject.com/ce/RemoveLowBattIndication.asp  

     

    Let me know if there is further issues.

     

    Cheers,

    Jennifer

     

    Monday, August 3, 2009 5:43 AM

All replies

  • Hi Mike,

     

     

    If you want to disable all the incoming sms notification display, go through the following steps manually.:

     

    Start->Settings->Sounds&Notifications

    In the"Notifications" tab and disable  the "display messages" checkbox for "Messaging: New text message”

     

    Or the following article shows how to remove notification programmatically

    http://www.codeproject.com/ce/RemoveLowBattIndication.asp  

     

    Let me know if there is further issues.

     

    Cheers,

    Jennifer

     

    Monday, August 3, 2009 5:43 AM
  • Hi Mike,

    In addition to JenniFer's reply,  I have two other ways to implement the function:

    1. Once we  intercept SMS via SNAPI, we can use RemoveNotification API to remove the notification. For more information, see this thread:
    http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/eac0d78d-5217-48c4-afca-cd7fc38712bc/

    2. Once we  intercept SMS via SNAPI, we can find the notification window using FindWindow, then hide it using ShowWindow


    I don't try it, please try it yourself.



    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, August 3, 2009 8:22 AM
  • I noticed in that thread you mentioned that after intercepting the message, you can save it yourself. How would I do this? (ie. save the smsmessage to the inbox)

    Thanks
    Tuesday, August 4, 2009 3:25 PM
  • Hi Mike,

    We can use MAPI to save it via IMAPIFolder::CreateMessage, for more information:
    http://msdn.microsoft.com/en-us/library/cc839874.aspx


    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, August 5, 2009 5:33 AM
  • I really hate to bother you again but is it possible to use MAPI from C#? Is there some way to do it using P/Invoke? Basically what I need to know is how, if at all, can this be acheived within a C# smart device project on Windows Mobile 6 Professional SDK platform?

    Thanks again
    Wednesday, August 5, 2009 9:16 PM
  • Hi MikeFromCanmore,

    Please refer to following article:

    Pocket PC and Smartphone 99% .NET MAPI


    Another way is using 3rd party control, like Inthehand, which wrap the MAPI.
    http://inthehand.com/content/Mobile.aspx


    Best regards,
    Guang-Ming Bian - MSFT

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, August 6, 2009 3:21 AM