amzn / fire-app-builder

Fire App Builder is a framework for building java media apps for Fire TV, allowing you to add your feed of media content to a configuration file and build an app to browse and play it quickly.
Other
181 stars 259 forks source link

During onPause should you requestVisibleBehind for playing back video? #70

Open philotas opened 3 years ago

philotas commented 3 years ago

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

levonlevonian commented 2 years ago

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!