public static void SendRegisterRequest(Register_Demo reg) { string registerMethod = "RemoteAPI/RegisterDevice"; if (reg.validate()) // if validation is OK and we configured all the nececcery fields, we can continue. { SendRequest(registerMethod, (Object)reg); } }
/** * Method is simulating a register request being sent to PushApps server. */ public static void SendRegisterRequest() { Register_Demo register = new Register_Demo(); register.SecretToken = SecretToken; register.PushToken = "This is my push token"; register.DeviceId = "This is my device ID"; register.DeviceType = Enums.DevicePlatform.Android; //can be changed to iOS register.CustomId = "This is my custom ID"; register.OSVersion = "alpha"; register.SDKVersion = "1.3"; register.AppVersion = "1"; register.TimeZone = 120; ActionsManager.SendRegisterRequest(register); // will send the registeration request to our server. }