Wednesday, 20 November 2019

JSONException Unexpected Identifier Error in Kony Visualizer

D/KonyJavaScriptVM: ************** Compiling Script file : frmDashboardController.js
2020-11-19 10:42:28.129 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSVM.cpp :: KonyJSVM_compileScriptENTER
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: ****************** V8 Message  *********************
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: message=Uncaught SyntaxError: Unexpected identifier
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: ****************************************************
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: getJSExceptionENTER
2020-11-19 10:42:28.131 20528-20571/com.orgname.SampleV9App I/cr_CachingUmaRecorder: Flushed 5 samples from 5 histograms.
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: ********** js exp stack trace not empty ************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: ********** js exp stack trace length  0 ************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: ********** js exp stack trace not NULL ************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: getJSExceptionEXIT
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: *********************************************************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: frmDashboardController.js:5
        registerDeviceID: function 
    Uncaught SyntaxError: Unexpected identifier
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: *********************************************************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: createJavaExceptionENTER
2020-11-19 10:42:28.132 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: createJavaExceptionEXIT
2020-11-19 10:42:28.132 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSVM.cpp :: KonyJSVM_compileScriptEXIT
2020-11-19 10:42:28.132 20528-20551/com.orgname.SampleV9App D/JSGlobalLib: onFileCompiledimportScripts : statusMsg=frmDashboardController.js:5
        registerDeviceID: function 
    Uncaught SyntaxError: Unexpected identifier] statusCode= expObj=frmDashboardController.js : 5
        registerDeviceID: function 
    Uncaught SyntaxError: Unexpected identifier









Monday, 17 June 2019

used to override an existing property.\n[available] Build file should not reuse the same property name for different values?



How to Build our app from the Command Line in Kony Visualizer Projects?




Build your app from the command line

About build types :-


   By default, there are two build types available for every Android app: one for debugging your app—the debugbuild—and one for releasing your app to users—the release build. The resulting output from each build must be signed with a certificate before you can deploy your app to a device. The debug build is automatically signed with a debug key provided by the SDK tools (it's insecure and you cannot publish with it to the Google Play Store), and the release build must be signed with your own private key.


 Build a debug APK


      For immediate app testing and debugging, you can build a debug APK. The debug APK is signed with a debug key provided by the SDK tools and allows debugging through adb.
To build a debug APK, open a command line and navigate to the root of your project directory. To initiate a debug build, invoke the assembleDebug task:
gradlew assembleDebug
This creates an APK named Project Name-debug.apk in
project_name/module_name/build/outputs/apk/. The file is already signed with the debug key and aligned with zipalign, so you can immediately install it on a device.


Steps :

 1) Project Location ===> cmd
 2) gradlew assembleDebug

Videos :-




Thursday, 11 April 2019

kony build.gradle add dependencies


build.gradle entries to Suffix

 android {
     compileSdkVersion 26
       useLibrary 'org.apache.http.legacy'
 defaultConfig {
       multiDexEnabled true
    }

compileOptions {
sourceCompatibility 1.8
 targetCompatibility 1.8
 }
 dexOptions {
    javaMaxHeapSize "4g"
    }
 }
dependencies.compile 'com.android.support.constraint:constraint-layout:1.1.3'
dependencies.compile 'org.tensorflow:tensorflow-android:1.12.0'
dependencies.compile 'com.google.android.gms:play-services-vision:17.0.2'
dependencies.compile 'com.android.support:recyclerview-v7:26.1.0'
dependencies.compile 'com.android.support:support-v13:26.1.0'
dependencies.compile 'com.android.support:appcompat-v7:26.1.0'





gradle.properties entries

       android.enableD8.desugaring = true









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 ...