Click here to Skip to main content
14,540,847 members
   

C#

 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah6-Jan-20 14:14
Memberengsooncheah6-Jan-20 14:14 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan6-Jan-20 23:09
mvaAfzaal Ahmad Zeeshan6-Jan-20 23:09 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah7-Jan-20 21:23
Memberengsooncheah7-Jan-20 21:23 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan7-Jan-20 22:03
mvaAfzaal Ahmad Zeeshan7-Jan-20 22:03 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah9-Jan-20 14:34
Memberengsooncheah9-Jan-20 14:34 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
Afzaal Ahmad Zeeshan9-Jan-20 22:26
mvaAfzaal Ahmad Zeeshan9-Jan-20 22:26 
GeneralRe: ChatBot retrieve data from SharePoint On Premise Issue Pin
engsooncheah21-Jan-20 19:37
Memberengsooncheah21-Jan-20 19:37 
Questionpush notification from android c# Pin
Member 477398728-Dec-19 11:51
MemberMember 477398728-Dec-19 11:51 
The below code i found in some websites but it always return error 

multicast_id":6719893729607364541,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}

Code is:

		WebRequest tRequest = WebRequest.Create("https://fcm.googleapis.com/fcm/send");
        tRequest.Method = "post";
        //serverKey - Key from Firebase cloud messaging server  
        tRequest.Headers.Add(string.Format("Authorization: key={0}", "Server key"));
        //Sender Id - From firebase project setting  
        tRequest.Headers.Add(string.Format("Sender: id={0}", "Sender Id"));
        tRequest.ContentType = "application/json";
        var payload = new
        {
            to = "//topics//news", // even "/topics/news:
			
            priority = "high",
            content_available = true,
            notification = new
            {
                body = "Test",
                title = "Test",
                badge = 1
            },
            data = new 
            {
                key1 = "value1",
                key2 = "value2"
            }

        };

        string postbody = JsonConvert.SerializeObject(payload).ToString();
        Byte[] byteArray = Encoding.UTF8.GetBytes(postbody);
        tRequest.ContentLength = byteArray.Length;
        using (Stream dataStream = tRequest.GetRequestStream())
        {
            dataStream.Write(byteArray, 0, byteArray.Length);
            using (WebResponse tResponse = tRequest.GetResponse())
            {
                using (Stream dataStreamResponse = tResponse.GetResponseStream())
                {
                    if (dataStreamResponse != null) using (StreamReader tReader = new StreamReader(dataStreamResponse))
                        {
                            String sResponseFromServer = tReader.ReadToEnd();
                            //result.Response = sResponseFromServer;
							this.Label.Text = sResponseFromServer;
                        }
                }
            }

AnswerRe: push notification from android c# Pin
OriginalGriff28-Dec-19 19:55
mveOriginalGriff28-Dec-19 19:55 
GeneralRe: push notification from android c# Pin
Member 477398728-Dec-19 20:45
MemberMember 477398728-Dec-19 20:45 
AnswerRe: push notification from android c# Pin
Richard MacCutchan28-Dec-19 21:53
mveRichard MacCutchan28-Dec-19 21:53 
GeneralRe: push notification from android c# Pin
OriginalGriff28-Dec-19 22:24
mveOriginalGriff28-Dec-19 22:24 
GeneralRe: push notification from android c# Pin
Richard MacCutchan28-Dec-19 22:26
mveRichard MacCutchan28-Dec-19 22:26 
GeneralRe: push notification from android c# Pin
Member 477398728-Dec-19 23:02
MemberMember 477398728-Dec-19 23:02 
QuestionUDP Hole Punching not Work Pin
DioCarvalho24-Dec-19 9:24
professionalDioCarvalho24-Dec-19 9:24 
AnswerRe: TCP Hole Punching not Work Pin
Gerry Schmitz24-Dec-19 11:27
mveGerry Schmitz24-Dec-19 11:27 
GeneralRe: TCP Hole Punching not Work Pin
DioCarvalho24-Dec-19 11:40
professionalDioCarvalho24-Dec-19 11:40 
AnswerRe: TCP Hole Punching not Work Pin
phil.o24-Dec-19 23:16
mvephil.o24-Dec-19 23:16 
GeneralRe: TCP Hole Punching not Work Pin
DioCarvalho25-Dec-19 6:15
professionalDioCarvalho25-Dec-19 6:15 
GeneralRe: TCP Hole Punching not Work Pin
phil.o25-Dec-19 6:22
mvephil.o25-Dec-19 6:22 
GeneralRe: TCP Hole Punching not Work Pin
DioCarvalho25-Dec-19 6:57
professionalDioCarvalho25-Dec-19 6:57 
GeneralRe: TCP Hole Punching not Work Pin
Gerry Schmitz26-Dec-19 6:24
mveGerry Schmitz26-Dec-19 6:24 
GeneralRe: TCP Hole Punching not Work Pin
DioCarvalho26-Dec-19 12:53
professionalDioCarvalho26-Dec-19 12:53 
QuestionLists basics Pin
_Q12_23-Dec-19 16:46
Member_Q12_23-Dec-19 16:46 
AnswerRe: Lists basics Pin
OriginalGriff23-Dec-19 20:28
mveOriginalGriff23-Dec-19 20:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.