/// <summary>
 /// Called when authenticate succeeded
 /// </summary>
 /// <param name="credentials"></param>
 public void OnAuthenticateSuccess(JSONCredentials credentials)
 {
     //  PluginResult result = new PluginResult(PluginResult.Status.OK);
     // Doing the serialization ourselfves: we are using JSON.Net but Cordova is using DataContractJsonSerializer
     // result.Message = JsonConvert.SerializeObject(credentials);
     //  DispatchCommandResult(result);
 }
        /// <summary>
        /// Native implementation for "getAuthCredentials" action.
        /// </summary>
        public void getAuthCredentials(object jsVersion)
        {
            JSONCredentials credentials = HybridMainPage.GetInstance().GetJSONCredentials();

            if (credentials == null)
            {
                // DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Never authenticated"));
            }
            else
            {
                OnAuthenticateSuccess(credentials);
            }
        }
 /// <summary>
 /// Called when authenticate succeeded
 /// </summary>
 /// <param name="credentials"></param>
 public void OnAuthenticateSuccess(JSONCredentials credentials)
 {
     //  PluginResult result = new PluginResult(PluginResult.Status.OK);
     // Doing the serialization ourselfves: we are using JSON.Net but Cordova is using DataContractJsonSerializer
        // result.Message = JsonConvert.SerializeObject(credentials);
       //  DispatchCommandResult(result);
 }