简体   繁体   中英

Screen capture with background service

I started to work with Lollipop & Media.Projection class to implement a screen sharing app. The demo project from Google is quite good enough for me to understand this new feature of Lollipop. But then I found it's hard to make the screen capture goes background since all the time when Home or Back button are pressed, the surface activity is destroyed hence the capturing thread will no longer work. Is there any hint on this situation?

This problem may cause by your application is finished by LMK(low memory killer).

You can pin a fixed notification by using "startForeground" on custom Service to avoid LMK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM