When i run my code in browser it works properly but when run program in android device at that time data came from sqlite but i tried to access and get error undefined.
code that i used
Trying to fetch data … length came 1
but when i tried to access(data.res.rows[0].UserId) get error undefined
this.db.getData(this.db.sqtable_UserInfo).then(data => {
console.log('userinfo length ’ + data.res.rows.length);
if(data.res.rows.length > 0)
{
console.log(‘username’,data.res.rows[0].UserId);
ResponseString.setLoginId(data.res.rows.UserId);
ResponseString.setLoginPassword(data.res.rows.Password);
this.isChecked = true;
this.userValue = ResponseString.getLoginId();
this.pwdValue = ResponseString.getLoginPassword();
} else{
this.isChecked = false;
}
},err => AllFunctions.doAlert('Error Occured - 104',this.navController));
Is there need any permission??