OneSignal is a free push notification service for web and mobile app. OneSignalSharpNet Package developed by Seawebtech Solutions and This Package makes it easy to integrate your send notification to all user from C#.net app.
I hope you like this post, please share and comment
1:Create New Project In C#.net or VB.net
In Visual Studio, choose File > New > Project, expand the Visual C# > Select Project click OK.
2: Install Package from nuget https://www.nuget.org/packages/OneSignalSharpNet/
PM> Install-Package OneSignalSharpNet
3: How to use
OneSignalClient client = new OneSignalClient( "YOU APP ID",//YOU APP ID
"APP REST KEY ",//APP REST KEY
"USER AUTH");//USER AUTH
4: Use following code for send notification
Segmant segmant = new Segmant(); segmant.IncludeSegmant(Segmant.Users.All); Dictionary<string, string> contentMsgs = new Dictionary<string, string>(); contentMsgs.Add("en", "Hello world!"); Dictionary<string, string> contentheadings = new Dictionary<string, string>(); contentheadings.Add("en", "Hello world!"); Dictionary<string, string> contentSubTitle = new Dictionary<string, string>(); contentSubTitle.Add("en", "Hello world!"); ContentAndLanguage content = new ContentAndLanguage(contentMsgs,contentheadings, contentSubTitle, false); //optional Attachment _objAttachment = new Attachment(); _objAttachment.url = "page url"; Appearance _objAppearance = new Appearance(); _objAppearance.chrome_web_image = "image url"; //optional Delivery _objdelivery = new OneSignalSharpNet.Posting.Delivery(); _objdelivery.delivery_time_of_day = "1:20PM"; _objdelivery.delayed_option = "timezone"; client.SendNotification(segmant, content, _objAttachment, null, _objAppearance, _objdelivery);
Term of Service – We do not own copyright of this Content on this website. The copyright belongs to the respective owners of the videos uploaded to Youtube . If you find any Content infringe your copyright or trademark, and want it to be removed from this website, or replaced by your original content, please contact us.