Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Android CustomView lifecycle


Hi, how do i delegate lifecycle callbacks to Player inside CustomView ? Player requires onPause, onResume, onDestroy lifecycle callbacks while CustomView in Android only has onDestroy (formally onDetachedFromWindow()). I'm thinking of Activity delegation only onPause and onResume to CustomView which delegates them to Player, but Player#onDestroy is called when onDetachedFromWindow() of CustomView is called (not Activity#onDestroy) ?

1 Community Answers

George

JW Player Support Agent  
0 rated :

I’d create public methods in CustomView class and call them from the Activity lifecycle methods as you would with the JW Player.

This question has received the maximum number of answers.