Screen capture using background service

I started working with the Lollipop class and Media.Projection to implement a screen sharing application. Google's demo project is good enough to understand this new Lollipop feature. But then it was difficult for me to make the screen capture a background, since all the time when the Home or Back button is pressed, surface activity is destroyed, so the capture thread no longer works. Is there a hint of this situation?

+4
source share
1 answer

This problem may be caused by your application terminating LMK (low memory killer).

You can bind a fixed notification using "startForeground" on a user service to avoid LMK.

0
source

All Articles