M Makumbi Well-Known Member Licensed User Longtime User Feb 28, 2019 #1 Please help how can create a timer which runs every minute to check json example for a new record and then send a notification Code: Dim j As HttpJob j.Initialize("", Me) j.Download("http://kccug.com/Generic_Handler_JSON/HandlerVBEvents.ashx?customerid=" & CustID) Code: Dim n As NB6 n.Initialize("default", Application.LabelName, "HIGH").SmallIcon(smiley) n.Build(quot.Get("Comments") , "Kabojja Junior School", "tag", Me).Notify(9)
Please help how can create a timer which runs every minute to check json example for a new record and then send a notification Code: Dim j As HttpJob j.Initialize("", Me) j.Download("http://kccug.com/Generic_Handler_JSON/HandlerVBEvents.ashx?customerid=" & CustID) Code: Dim n As NB6 n.Initialize("default", Application.LabelName, "HIGH").SmallIcon(smiley) n.Build(quot.Get("Comments") , "Kabojja Junior School", "tag", Me).Notify(9)
DonManfred Expert Licensed User Longtime User Feb 28, 2019 #2 Makumbi said: Please help how can create a timer which runs every minute to check json Click to expand... You can not restart a service (and even not an activity) in this short amount of time. The only way to get a long running task is to use a foregroundservice. Use a timer here. See an Example here: https://www.b4x.com/android/forum/threads/background-location-tracking.99873/ Upvote 0
Makumbi said: Please help how can create a timer which runs every minute to check json Click to expand... You can not restart a service (and even not an activity) in this short amount of time. The only way to get a long running task is to use a foregroundservice. Use a timer here. See an Example here: https://www.b4x.com/android/forum/threads/background-location-tracking.99873/