【问题标题】:React native webivew, playing youtube videos - Violation of Device and Network Abuse policyReact Native webview,播放 youtube 视频 - 违反设备和网络滥用政策
【发布时间】:2020-02-12 23:06:33
【问题描述】:

当我将我的应用程序提交到 Play 商店时,我收到以下错误。如何提交我的应用?

export default class VideoPlayer extends React.PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      appState: AppState.currentState
    };
  }

  componentDidMount() {
    AppState.addEventListener("change", this._handleAppStateChange);
  }

  componentWillUnmount() {
    AppState.removeEventListener("change", this._handleAppStateChange);
  }

  _handleAppStateChange = nextAppState => {
    this.setState({ appState: nextAppState });
  };

  render() {
    let {

      youtubeVideo,

    } = this.props;

    return (
      <View style={styles.container}>
        {this.state.appState == "active" && (
          <WebView
            mediaPlaybackRequiresUserAction={true}
            style={{
              height: 240,
              width: "100%",
              alignSelf: "center",
              alignContent: "center"
            }}
            source={{
              uri: `https://www.youtube.com/embed/${youtubeVideo}?rel=0`
            }}
          />
        )}
      </View>
    );
  }
}

问题:违反设备和网络滥用政策 我们不允许应用程序干扰、破坏、损坏或以未经授权的方式访问用户的设备、其他设备或计算机、服务器、网络、应用程序编程接口 (API) 或服务,包括但不限于其他应用程序在设备、任何 Google 服务或授权运营商的网络上。

您的应用不应以违反其服务条款的方式访问或使用服务或 API。例如,您的应用不得以违反 YouTube 服务条款的方式下载、获利或访问 YouTube 视频。

【问题讨论】:

    标签: react-native youtube google-play-console


    【解决方案1】:

    通过将以下内容添加到AndroidManifest.xml 来修复:

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-07
      • 1970-01-01
      • 2019-12-16
      • 2012-12-14
      • 2012-06-07
      • 2020-06-13
      相关资源
      最近更新 更多