Skip to content
Advertisement

YoutubePlayer API endless loading issue

I am starting a new intent whenever a new geofence transition happens.

In GeofenceTransitionService.java:

JavaScript

And I am initializing the fragment like this,

in VideoActivity.java:

JavaScript

activity_video.xml:

JavaScript

But the video will never load. It works fine on other activities though. I have checked the manifest but couldn’t find anything that differentiates this activity from the other one that works. I use the same code for the other activity to initialize the other fragment.

Advertisement

Answer

I forgot to split the video url to get the videoID.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement