# Problem in google play : violation of our device and network abuse policy and section 4.4

**URL:** <https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103>\
**Category:** ionic-v3\
**Created:** [June 5, 2017, 8:29pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103 "2017-06-05T20:29:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal131](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pascal131](https://forum.ionicframework.com/u/pascal131)\
**Post date:** [June 5, 2017, 8:29pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/1 "2017-06-05T20:29:02Z")

</div>

Hello

I make a ionic V2 application. This application display articles, products and videos from :

- my youtube channel
- my blog wordpress
- my shop prestashop

All this informations come from json files.

I submit an alpha version in android store Google Play, (this is the first tilme I ever go in Google Play).

But it reject the request with this error :  
**reject it because it violates our device and network abuse policy and section 4.4 of the Developer Distribution Agreement. If you submitted an update, the previous version of your app is still live on Google Play.**

**Here’s how you can submit your app for another review:**

**Modify your app to make sure it doesn’t access or use a service or API in a manner that violates its terms of service; for example, by enabling background play of YouTube videos.**  
**Read through the Device and Network Abuse policy for more details and examples.**  
**Make sure your app is compliant with all other policies listed in the Developer Program Policies. Remember that additional enforcement could occur if there are further policy issues with your apps.**  
**Sign in to your Play Console and submit your app.**

I search informations in Google and find several explanations. But I don’t really understand what Google Play is telling me.

Is someone could help me to resolve this issue ? What is the problem with Google Play ?

Thanks for your help

Regards

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [June 5, 2017, 8:41pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/2 "2017-06-05T20:41:14Z")

</div>

> [@pascal131](#):
>
> Modify your app to make sure it doesn’t access or use a service or API in a manner that violates its terms of service; for example, by enabling background play of YouTube videos.

Seems it doesn’t like how you embedded your YouTube channel.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [June 5, 2017, 8:42pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/3 "2017-06-05T20:42:47Z")

</div>

Fire up your app, open a YouTube video, and then pause or background the app. Does the video keep playing?

---

<div class="post-metadata">

**Author:** ![pascal131](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pascal131](https://forum.ionicframework.com/u/pascal131)\
**Post date:** [June 5, 2017, 8:52pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/4 "2017-06-05T20:52:04Z")

</div>

Hello  
Thanks for your answsers

In an old version, it doesn’t stop.

I use the cordova-plugin-inappbrowser :

> **[Launch Websites With Ionic 2 Using The InAppBrowser](https://www.thepolyglotdeveloper.com/2016/01/launch-websites-with-ionic-2-using-the-inappbrowser/)**
>
> Access external websites in an Ionic 2 Android and iOS application by making use of the Apache Cordova InAppBrowser plugin.

   
**\*\* \<iframe frameborder=“0” allowfullscreen [src]=“urlVideo”\>\*\*  
\*\*** 
**\*\***

**this.urlVideo = this.sanitizer.bypassSecurityTrustResourceUrl(url);**

I read in a post that I have to pause my video with something like that :  
document.addEventListener(“pause”, onPause, false);  
function onPause() {

```
//player.stopVideo(); ???????
}

```

But I dont know how and where to do it ? In app.composents.ts ?

---

<div class="post-metadata">

**Author:** ![pascal131](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pascal131](https://forum.ionicframework.com/u/pascal131)\
**Post date:** [June 5, 2017, 10:03pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/5 "2017-06-05T22:03:06Z")

</div>

I use the cordova plugin cordova-plugin-inappbrowser :  
([https://www.thepolyglotdeveloper.com/2016/01/launch-websites-with-ionic-2-using-the-inappbrowser/](https://www.thepolyglotdeveloper.com/2016/01/launch-websites-with-ionic-2-using-the-inappbrowser/))

   
**\*\* \<iframe frameborder=“0” allowfullscreen [src]=“urlVideo”\>\*\*  
\*\*** 
**\*\***

**this.urlVideo = this.sanitizer.bypassSecurityTrustResourceUrl(url);**

My service :

**url = ‘[https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&maxResults=50&channelId=myIDXXXXX&key=myKeyZZZZZZ](https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&maxResults=50&channelId=myIDXXXXX&key=myKeyZZZZZZ)’;**

**…**

**getVideos(url){**  
\*\* return this.http.get(url)\*\*  
\*\* .map(res =\> res.json());\*\*  
**}**

---

<div class="post-metadata">

**Author:** ![pascal131](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pascal131](https://forum.ionicframework.com/u/pascal131)\
**Post date:** [June 5, 2017, 10:29pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/6 "2017-06-05T22:29:21Z")

</div>

I used the cordova plugin cordova-plugin-inappbrowser

Html file :

```
     ` <iframe frameborder="0" allowfullscreen [src]="urlVideo"></iframe>`

```

Ts file :  
this.urlVideo = this.sanitizer.bypassSecurityTrustResourceUrl(url);

Service :

url = ‘[https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&maxResults=50&channelId=myIDXXXXX&key=myKeyZZZZZZ](https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&maxResults=50&channelId=myIDXXXXX&key=myKeyZZZZZZ)’;  
…  
getVideos(url){  
return this.http.get(url)  
.map(res =\> res.json());  
}

I read that we have to stop the player when the application is in pause.  
Something like that :  
document.addEventListener(“pause”, onPause, false);  
[//player.stopVideo](https://player.stopVideo)(); ???  
}

But I don’t know how to do it and where to put this code ? In app.components.ts ?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [June 5, 2017, 10:40pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/7 "2017-06-05T22:40:40Z")

</div>

Avoid using `document` as much as is absolutely possible. In this case, [Platform](https://ionicframework.com/docs/api/platform/Platform/) has a `pause` event.

---

<div class="post-metadata">

**Author:** ![pascal131](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pascal131](https://forum.ionicframework.com/u/pascal131)\
**Post date:** [June 6, 2017, 8:15pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/8 "2017-06-06T20:15:50Z")

</div>

Sorry, I don’t use cordova-plugin-inappbrowser ! 😊

I don’t know how to pause video player with \<iframe and where to put this code ?  
In app.components.ts ?

I don’t find usefull exemple in the web.

---

<div class="post-metadata">

**Author:** ![pascal131](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pascal131](https://forum.ionicframework.com/u/pascal131)\
**Post date:** [June 10, 2017, 9:53pm UTC](https://forum.ionicframework.com/t/problem-in-google-play-violation-of-our-device-and-network-abuse-policy-and-section-4-4/93103/9 "2017-06-10T21:53:23Z")

</div>

I submit in google play an empty app.  
Then I submit again my real app and I don’t have any more the error message.
