I want to run a long-live operation inside a seperate thread. My question is, what is the lifetime of a thread in Android?
It lasts the time that it takes to run the code that has inside.
Runtime of thread is depended on the code present in the thread.
If there is any code like background service which updates gps location every 2 seconds, thread will never come to end.
Or it may be ended as described in thread's code structure.
Well, the thing is that, when i place a long running operation inside the thread, it gets ended after a while. My question is, WHY?
In windows application, i call StartStreamMatchingAllConditionsAsync() method and it works fine until i cancel it, but in my android app it doesn't.
btw, the long running operation is Tweetinvi's method "StartStreamMatchingAllConditions()" inside a BackgroundWorker.
Found out that the problem was caused by the OS battery saving feature, disabling it made the app function normally.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies