Android 12 and 13 – Activity Recognition With broadcast receiver in background stop giving me Recognition Results after few hours or days
I am trying to get user activity states by Activity Recognition API and it works in foreground and for few hours in background too (When user exit the app) but after more than 4/5 hours or after 2 or 3 days it stop sending user activity states by Activity Recognition API. In specific REALME 12 and Samsung M12 Android 12 versions I am facing this inconsistency from last 2 weeks. When I debug and try to catch the issue then it will trigger and give me Activity Recognition update in on start command as I mention below. I also tried with Activity-Transition method and create new Broadcast receiver still getting no result at all. In Android version 14 it is working perfect.
Android 12 and 13 OS – Activity Recognition With broadcast receiver in background stop giving me Recognition Results after few hours or days
I am trying to get user activity states by Activity Recognition API and it works in foreground and for few hours in background too (When user exit the app) but after more than 4/5 hours or after 2 or 3 days it stop sending user activity states by Activity Recognition API. In specific REALME 12 and Samsung M12 Android 12 versions I am facing this inconsistency from last 2 weeks. When I debug and try to catch the issue then it will trigger and give me Activity Recognition update in on start command as I mention below. I also tried with Activity-Transition method and create new Broadcast receiver still getting no result at all. In Android version 14 it is working perfect.