new YouTubeExtractor(myContext) {
@Override
public void onExtractionComplete(SparseArray<YtFile> ytFiles, VideoMeta vMeta) {
mainProgressBar.setVisibility(View.GONE);
if (ytFiles != null) {
if (ytFiles == null) {
// Something went wrong we got no urls. Always check this.
Log.i("DownloadURL", "YT file NONE ");
return;
}
Log.i("DownloadURL", "Tags avalable " + ytFiles.size());
updateView(ytFiles,vMeta);
}
}
}.extract(videoURl, false, false);
The above code executes in 2 seconds when it is inside an activity where as the same code with the same internet speed executes in more than 10 seconds in a fragment. What should I do to make the code execute faster in fragments?
The above code executes in 2 seconds when it is inside an activity where as the same code with the same internet speed executes in more than 10 seconds in a fragment. What should I do to make the code execute faster in fragments?