Esempio n. 1
0
        public static SMSSubmit ServiceIndicationMessage()
        {
            ServiceIndication si = new ServiceIndication();
            si.Action = ServiceIndicationAction.Signal_medium;
            si.Text = "Service indication from SharpSMS";
            si.Href = "https://github.com/pbansky/SharpSMS";
            si.Expires = DateTime.Now.AddDays(3);

            WapPushMessage wapPushMessage = new WapPushMessage(si);
            wapPushMessage.XWapInitiatorURI = "SharpSMS";

            return new SMSSubmit(wapPushMessage);
        }
Esempio n. 2
0
        public static SMSSubmit ServiceLoadingMessage()
        {
            ServiceLoading sl = new ServiceLoading();
            sl.Action = ServiceLoadingAction.Execute_high;
            // This is a cab file with Total Commander for Windows Mobile 5/6/6.5
            sl.Href = "http://ghisler.fileburst.com/ce/tcmdphone.cab";

            WapPushMessage wapPushMessage = new WapPushMessage(sl);
            wapPushMessage.XWapInitiatorURI = "SharpSMS";
            return new SMSSubmit(wapPushMessage);
        }
Esempio n. 3
0
        public static SMSSubmit WapPushConfiguration()
        {
            // This is a configuration XML for Windows Mobile Internet Explorer Favorites
            string configXML = @"<wap-provisioningdoc><characteristic type=""BrowserFavorite""><characteristic type=""SharpSMS""><parm name=""URL"" value=""https://github.com/pbansky/SharpSMS""/></characteristic></characteristic></wap-provisioningdoc>";

            WapPushMessage wapPushMessage = new WapPushMessage();
            wapPushMessage.XWapInitiatorURI = "SharpSMS";

            wapPushMessage.ContentType = "text/vnd.wap.connectivity-xml";
            wapPushMessage.Data = Encoding.UTF8.GetBytes(configXML);

            wapPushMessage.Security = Wsp.SecurityMethod.USERPIN;
            wapPushMessage.UserPin = "1234";

            return new SMSSubmit(wapPushMessage);
        }