Sunday, 13 January 2019

how to hit the service without Mobile Fabric in Kony visualizer?

HttpRequest 

        To send requests to any resource on the network and fetch the response

Sending a JSON Object and String data as a Request

Use one of the following:
//Directly sending JSON object
httpclient.send(postdata);
//Converting JSON object to JSON string and sending
var jsonStr1 = JSON.stringify(postdata); 
httpclient.send(jsonStr1);
//Sending JSON string
var jsonStr2= "{\"userId\":\"test\",\"password\":\"test123\"}";
httpclient.send(jsonStr2);


Example :-


define({

  onNavigate : function(objectEvent){
    this.view.btnServiceCallEvent.onClick = this.onServiceCallEventFun;
  },

  onServiceCallEventFun : function(){
    var httpclient = new kony.net.HttpRequest();
    httpclient.open(constants.HTTP_METHOD_POST, "https://neutrinoapi.com/email-validate");
    httpclient.setRequestHeader("user-id", "chandru");
    httpclient.setRequestHeader("api-key", "5wPeyo4c9dFcUIyWMTghQP80nj3k0uyJzgals0MNKQ9wAjyf");
    httpclient.setRequestHeader("Content-Type", "application/json");
    var postdata = {
      "email":"chandbecse@gmail.com",
      "fix-typos":true
    };
    httpclient.timeout = 20000;
    httpclient.onReadyStateChange = function(response){

      kony.print("Result valid  ==> "+response.valid);
      kony.print("Result provider  ==> "+response.provider);
      kony.print("Result domain ==> "+response.domain);
      kony.print("Result Response ==>  :"+JSON.stringify(response));

    };
    httpclient.send(postdata);
  }
});



Example Videos :




Friday, 11 January 2019

How to Working with Components, Kony Marketplace, and Masters?

Import a Component or Master

You can simplify and speed up development of mobile applications by using existing components. You can download a variety of components from Kony Marketplace and import them into your projects, or import reusable components that you have created yourself. For information on creating a component.




Videos : 






A failure occurred while executing com.android.build.gradle.tasks

Error in Kony visualizer V9 service pack 6 and FX11  [2023-01-09 22:23:32.695] [DEBUG] ~~~~ - INFO [exec-shell] Execution failed for task ...