I built a small education app useful for kids. So i map subjects and concepts like below:
Then a kid can click on the link, then in the next activity I am streaming YouTube video in YouTubePlayer:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<com.google.android.youtube.player.YouTubePlayerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/youtubePlayerID"
android:layout_marginTop="35dp"
android:gravity="center"
/>
<ImageView
android:id="@+id/closeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:adjustViewBounds="true"
android:scaleType="fitStart"
android:src="@mipmap/close_32" />
</FrameLayout>
Then i am using below code to play the video in above YouTubePlayerView:
ypView.initialize(strYoutubeKey, new YouTubePlayer.OnInitializedListener() {
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult result) {
Log.d("onInitializationFailure","Unable to load");
}
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) {
if(!wasRestored)
player.loadVideo(**strVideoURL**);
//player.cueVideo(strVideoURL,1);
}
});
The strVideoURL is any video URL corresponds to the topic developed by creators available in YouTube(Ex: https://www.youtube.com/watch?v=_B5dhVPeqSg for the first topic from above picture)
I have published this app in Playstore and now Google has removed the app from Playstore.
I follow up with them couple of times and they replied saying below: Thanks for reaching out to the Google Play Team.
We reviewed your app (com.udayrepo.classelearn) and the initial takedown decision was confirmed. Your app will not be reinstated because it violates our Device and Network Abuse policy by downloading, monetizing, or otherwise accessing YouTube videos in violation of the YouTube Terms of Service or YouTube API Terms of Service.
> For example, your app is able to stream copyrighted works from YouTube illegally.
You'll need to make changes to your app before submitting it for another review. If you choose to submit your app again, you may want to review the Device and Network Abuse policy and the Developer Program Policies for additional guidance.
Please let me know if you have any other questions.
- Can someone help what is the right way to use YouTube videos in our app?
- When a kid clicks on the link, cant we play that video in our app?
- Can i redirect that video directly play in YouTube and not in my app.
Suggest me better which i can do.
Looking forward all your help.