Titanium Appcelerator callback fuction not working in Android

160 views Asked by At

I have working in Titanium Appcelerator , Both iOS and Android . The calll Back Function Not workig in Android But work in iOS, Below is simple example

$.saveBtnVw.addEventListener('click', function(e){
    console.log("Save Button Clicked");
    saveAction(calBkFun);
});

var calBkFun = function(){
    console.log("Inside Call Back Function");
    alert("Call Back function Working.....");
};

function saveAction(calBkFun){
    console.log("Inside SaveAction Function");
    calBkFun;
}

Only get console Output "Sav e Button Clicked" And "Save Button Clicked" .

But not getin "Inside Call Back Function" and also not getting alert.

That's also not working for my common function(like inside app.js). Hope Some one will Help to solve this.

Thanks in Advance!

1

There are 1 answers

0
LHIOUI On

calBkFun is a function so you should call it like this :

function saveAction(calBkFun){
    console.log("Inside SaveAction Function");
    calBkFun();
}