Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Google pulled my and rejected my app updates - advice required?
Started by techdojo Sep 28 2018 01:02 AM

2 replies to this topic

Best Answer techdojo , 01 October 2018 - 01:03 AM

Not the most useful response unless there's a new "approved by Google" way of playing YouTube videos.

However I was able to find a fix thanks to a suggestion by alan_thomson on the Slack channel.

 

When playing a video in a webview on certain Android devices (although NOT on the Pixel) when the app get's suspended then the video continues to play. Once it was pointed out to me I was able to replicate the behaviour in the Mac Simulator by pressing Cmd + down.

 

What I did was when I create the composer overlay to open the webview was to add a runtime event listener for the appSuspended event and in the handler close the overlay - I'm sure there's probably a cleaner way of interacting with the video via the Javascript api and pausing / restarting it but this worked well enough for now and my app has been re-instated in the store so I'm happy!

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

techdojo

[GLOBAL: userInfoPane.html]
techdojo
  • Contributor

  • 117 posts
  • Corona SDK

Hi folks,

I'm after some advice from any Corona dev's who have experience in android submissions and playing YouTube videos.

 

A large part of my app - The Ukulele App is a searchable list of the 500+ videos from the The Ukulele Teacher's official YouTube channel (used with permission - we're partners in developing this app)

 

I received notice about a week ago that Google had pulled my app from the store because they had detected (after 18 months and 600,000+ downloads) that I was using Google Analytics in my app (via the official Corona plugin) and I didn't have a privacy policy in the store description or a link in the app - ok so that was obviously fixed within a day but they then rejected the app because they said that me the way I was using YouTube videos was violating the Device and Network Abuse policy as the screen that contained the embedded webview that I use to play YouTube videos contained ad's from a third party provider (ironically enough adMob - again through the official Corona plugin).

 

So I submitted a new update a couple of days ago that removes the ad's when YouTube videos are playing (for some reason Google's own ad's never seem to show when playing videos through an embedded webview),  anyway this update was rejected again and this morning I got the following as part of my second appeal to have the app re-instated.

 

"I reviewed you app again and found that your app violates the Device and Network Abuse policy by enabling background play (audio) of YouTube videos after the screen is turned off. "

 

This is not something I've seen before and I've tested the app on my iOS devices (I need to get access to a new'ish android device for testing) and turning the screen off whilst the video is playing does pause the audio and video.

 

Does anyone have any ideas as to what Google might be referring to here and what possible things I can try to resolve this issue?

 

Below is a copy of the code I use to play YouTube videos within an embedded WebView in an Composer overlay.

  -- Create the webview

  local topOffset = (headerSize+1) * DISPLAY_SCALE
  local pageHeight = display.contentHeight - topOffset - adOffset

   webView = native.newWebView(_CX, _CY + ((topOffset-adOffset) / 2), display.contentWidth, pageHeight)
   webView:request("playVideo.html", system.TemporaryDirectory)
   webView:addEventListener( "urlRequest", webListener )
  -- Write some html to playVideo.html

  fh:write([[<iframe id="vid" width="100%" height="]] .. height .. [[" src="http://www.youtube-nocookie.com/embed/]]
 .. videoID .. [[" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>]])


Any help or advice gratefully received.

 

Jon... 



[TOPIC: post.html]
#2

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,862 posts
  • Corona SDK

Don't use a webview



[TOPIC: post.html]
#3

techdojo

[GLOBAL: userInfoPane.html]
techdojo
  • Contributor

  • 117 posts
  • Corona SDK

  Best Answer

Not the most useful response unless there's a new "approved by Google" way of playing YouTube videos.

However I was able to find a fix thanks to a suggestion by alan_thomson on the Slack channel.

 

When playing a video in a webview on certain Android devices (although NOT on the Pixel) when the app get's suspended then the video continues to play. Once it was pointed out to me I was able to replicate the behaviour in the Mac Simulator by pressing Cmd + down.

 

What I did was when I create the composer overlay to open the webview was to add a runtime event listener for the appSuspended event and in the handler close the overlay - I'm sure there's probably a cleaner way of interacting with the video via the Javascript api and pausing / restarting it but this worked well enough for now and my app has been re-instated in the store so I'm happy!




[topic_controls]
[/topic_controls]