fire-app-builder icon indicating copy to clipboard operation
fire-app-builder copied to clipboard

During onPause should you requestVisibleBehind for playing back video?

Open philotas opened this issue 3 years ago • 1 comments

The Android TV docs describe how you can/should request to play video when onPause is called. Does that also apply to Fire OS? It does not say so in the recommendations for onPause for MultiMedia Apps

philotas avatar Jun 17 '21 22:06 philotas

Hi philotas,

Yes, it applies to Fire OS as well. Please also note that requestVisibleBehind() has been deprecated as of API Level 26: https://developer.android.com/reference/android/app/Activity#requestVisibleBehind(boolean)

In addition to that, the function returns a boolean, which will tell you whether the request was successful (e.g. if the OS does not support that feature, you would get false when calling it, meaning you cannot count on the video to continue playing, which is decided by the OS). Thanks!

levonlevonian avatar Oct 21 '21 15:10 levonlevonian