public SampleClient(IWorklightClient wlc, IWorklightPush push) { this.client = wlc; this.push = push; SecurityCheckChallengeHandler customCH = new CustomChallengeHandler(appRealm); client.RegisterChallengeHandler(customCH); push.Initialize(); }
/// <summary> /// Connect to the server instance /// </summary> private async Task <WorklightResponse> Connect() { //lets send a message to the server client.Analytics.Log("Trying to connect to server", metadata); ChallengeHandler customCH = new CustomChallengeHandler(appRealm); client.RegisterChallengeHandler(customCH); WorklightResponse task = await client.Connect(); //lets log to the local client (not server) client.Logger("Xamarin").Trace("connection"); //write to the server the connection status client.Analytics.Log("Connect response : " + task.Success); return(task); }
/// <summary> /// Connect to the server instance /// </summary> private async Task<WorklightResponse> Connect() { //lets send a message to the server client.Analytics.Log("Trying to connect to server", metadata); ChallengeHandler customCH = new CustomChallengeHandler(appRealm); client.RegisterChallengeHandler(customCH); WorklightResponse task = await client.Connect(); //lets log to the local client (not server) client.Logger("Xamarin").Trace("connection"); //write to the server the connection status client.Analytics.Log("Connect response : " + task.Success); return task; }