Recently we pushed one app into Google play store, our app hosts the youtube video links & play the content through YouTube player.
We received policy violation
In my case, I had a WebView linked to Google News - that included YouTube videos. The app violates the Device and Network Abuse policy. "Background play of YouTube content is not allowed in any cases."
Solution - I added this code
override fun onPause() {
super.onPause()
mWebView?.onPause()
mWebView?.pauseTimers()
}
override fun onResume() {
super.onResume()
mWebView?.onResume()
mWebView?.resumeTimers()
}
I know it' too late to answer for this question. I am sure, it will help some people,
I got same reply from google. I couldn't figure out what is the issue. So I emailed them to elaborate the issue rather than telling in general. The issue was, I was displaying banner ad while playing video. This violates their youtube policy. I removed the banner ad when video plays and uploaded the apk again. They accepted the apk this time.
You can always mail google asking about the issue, they will respond back in 1-2 days.
Hope it helps some people.
just paste this in your manifest this code worked for me several times when I had this problem after submitting the app
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
In our case, it was that the webview had an iFrame of a youtube video.
You must pause the video when the activity goes on pause / stop.
Google doesn't tolerate playing the youtube videos in background