You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm making an appservice and I want to make one httpRequest, When I start the time service (every minute make an httrequest) it fails, but I have added a notify and works so timeservice is working properly, but httpRequest doesn't work... But If I start the service and reboot watch, whe It start the time service comes to life, all works perfect, notify and httpRequest... It's like something has not been initialize properly... My watch is Amazfit Active with Zeppos4, and zml is 0.0.23... So a piece of my code is:
Hi, I'm making an appservice and I want to make one httpRequest, When I start the time service (every minute make an httrequest) it fails, but I have added a notify and works so timeservice is working properly, but httpRequest doesn't work... But If I start the service and reboot watch, whe It start the time service comes to life, all works perfect, notify and httpRequest... It's like something has not been initialize properly... My watch is Amazfit Active with Zeppos4, and zml is 0.0.23... So a piece of my code is:
AppService(
BasePage({
onInit(_) {
timeSensor.onPerMinute(() => {
this.getMetrics();
});
},
getMetrics() {
this.httpRequest({
method: 'GET',
url: endPoint,
headers: {
'Content-Type': 'application/json'
}
})
.then((result) => {
try
{
const status = JSON.stringify(result);
}).catch((error) => {
});
},
onDestroy() {
//logger.log("service on destroy invoke");
},
}));
Please can you see what would be the problem?
Thank you very much.
Regards
The text was updated successfully, but these errors were encountered: