0

i get this message in the logcat when execute my app.

Activity com.jeslomo.judokatium_2.CinturonActivity has leaked ServiceConnection com.google.android.youtube.player.internal.r$e@42201a30 that was originally bound here

I try to load a intent of youtube:

Intent intent = YouTubeStandalonePlayer.createVideoIntent(acty, API_KEY , videoId, 0, false, false); acty.startActivity(intent);

But the video load correctly.

"acty" is a activity that i passing to BaseAdapter for load the video.

How can i resolve it?

Thanks!!

P.D: Sorry for my bad english.

Dracknes
  • 79
  • 2
  • 10

1 Answers1

2

Please try this hope it's work: load the api when the second page appears, and also then init the YouTube API. Instead of supplying your activity as the context try supplying the application context to the api.

Intent intent = YouTubeStandalonePlayer.createVideoIntent(getApplicationContext(), API_KEY , videoId, 0,  false, false); 
acty.startActivity(intent);
Farhan Shah
  • 2,344
  • 7
  • 28
  • 54
  • Hi, if i implement in the activity "YouTubePlayer.OnInitializedListener" although his methods are empty dont crash! Thanks for you answer! – Dracknes Jan 30 '14 at 10:15