I have tried many times to upload my app, that has a json from WordPress and webview to open a link from json, I made the changes thas was sugest here. Because when I try to upload, Google send me this message:

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.

This is my webview code:

public class Webview extends AppCompatActivity {

WebView myWebView;
private boolean mShouldPause;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_webview);

    String link = getIntent().getStringExtra("link");

    myWebView = (WebView) findViewById(R.id.vebview);
    myWebView.loadUrl(link);

    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);

    myWebView.setWebViewClient(new WebViewClient(){
        @Override
        public void onLoadResource(WebView webview, String url) {
            super.onLoadResource(webview, url);
            if (url.contains("youtube.com")) mShouldPause = true;
        }

    });

    //button for share the link of webview
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent(Intent.ACTION_SEND);
            intent.setType("text/plain");
            String shareBody = "you body here";
            String shareSub= "suject here";
            intent.putExtra(Intent.EXTRA_SUBJECT,shareSub);
            intent.putExtra(Intent.EXTRA_TEXT,shareBody);
            startActivity(Intent.createChooser(intent,"Compartilhe"));
        }
    });
}

@Override
public void onPause() {
    super.onPause();
    if(mShouldPause){
        myWebView.onPause();
    }
    mShouldPause = false;
}

Somebody know what I’m doing wrong? (sorry for my bad english)

Read more here: My app has been reject by Google Play Console


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: