gpt4 book ai didi

react-native - 响应 native Webview,播放youtube视频-违反设备和网络滥用政策

转载 作者:行者123 更新时间:2023-12-03 05:53:22 24 4
gpt4 key购买 nike

将我的应用提交到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>
);
}
}

Issue: Violation of Device and Network Abuse policy We don’t allow apps that interfere with, disrupt, damage, or access in an unauthorized manner the user’s device, other devices or computers, servers, networks, application programming interfaces (APIs), or services, including but not limited to other apps on the device, any Google service, or an authorized carrier’s network.

Your app shouldn’t access or use the service or API in a manner that violates its terms of service. For example, your app shouldn't download, monetize, or access YouTube videos in a way that violates the YouTube Terms of Service.

最佳答案

通过在AndroidManifest.xml中添加以下内容进行修复:

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

关于react-native - 响应 native Webview,播放youtube视频-违反设备和网络滥用政策,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58408703/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com