Android: Customizing recent apps thumbnail (screenshot by default)

前端 未结 5 800
暖寄归人
暖寄归人 2020-12-07 23:48

The app I\'m working on shows some sensitive information that must not be shown on the \"Recent Tasks\" screen when stopping the app by pressing the home button.

I\'

5条回答
  •  爱一瞬间的悲伤
    2020-12-08 00:23

    How about implementing a layout overlay on top of your entire activity?

    Make it transparent, it's click-through by default, so no negative impact on UX while in use.

    In onPause() set a half-transparent, blurred image as the background of that layout, the data will be scrambled behind it. In onResume() change the background to fully transparent again. Voila.

    It might be faster than other types of overlays. The positive side effect is, if you do the unblurring as a short animation effect when the user goes back (with a proper library that uses C++ instead of Java), it might even look cool and the users wouldnt even mind seeing it.

    I haven't tried this myself, but it's something you haven't tried yet.

提交回复
热议问题