Start a new topic

call Kinvey.init without connection

Hello support team!

I'm working on offline and caching supporting for my PhoneGap application. When I start my application with connection and then close Internet connection caching works fine. But if I try to start my application without connection I can't get any result in Kinvey.init promise (alerts aren't called: see my code below).
My Kinvey.init looks like this:

var promise = Kinvey.init({
appKey: 'APP_key',
appSecret: 'APP_SECRET',
refresh: navigator.onLine,
sync: {
enable: true,
online: navigator.onLine

promise.then(function (user) { alert("success");
//some code for success
function (error) { alert("fail"); //some code for fail

Is it possible to get any response if I call Kinvey.init method without connection? 

Login or Signup to post a comment