I tried to follow Background location tracking example, need it running in foreground without being killed. Ater some hours, i checked. Foreground notification stopped.
I tried to look how to prevent it from stopping i saw SetExactAndAllowWhileIdle, but when i tried to replace StartServiceAt with SetExactAndAllowWhileIdle , it says Undeclared variable 'setexactandallowwhileidle' is used before it was assigned any value.
Another question
should i put this SetServiceAttribute(Tracker, android:foregroundServiceType, "location") in the manifest even some of the phones are not android 10+
i didnt saw this in the manifest
Thank you