登录App我的应用程序在后台模式下正常运行但是如果我从后台模式清除应用程序后它会自动从应用程序中注销。但我希望它应该登录,直到用户从App手动注销。我怎么能成功呢?
我的代码:
results = {
iuser_id: response.iuser_id,
signup_ids: response.signup_ids,
staff_id : response.staff_id,
vusername: response.vusername,
vfirst_name: response.vfirst_name,
vlast_name: response.vlast_name,
vemail : response.vemail,
vpwd : response.vpwd
};
Ti.App.Properties.setObject("user_session",results);
results = null;
var flag = '';
if (!Ti.App.Properties.hasProperty('installed'))
{
Ti.App.Properties.setBool('app:isLoggedIn', true);
Ti.App.Properties.hasProperty('installed');
Ti.App.Properties.setBool('installed', true);
var th_sign = Alloy.createController('login').getView();
th_sign.open();
}
else
{
var th_sign = Alloy.createController('home').getView();
th_sign.open();
}
}