I am using Youtube Extractor library
implementation 'com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT'
I am using this to fetch YouTube download URL in my fragment which upload to my firebase database as soon as it finish extracting
if (requestCode==0000 && resultCode==getActivity().RESULT_OK){
if (videoPath != null ) {
for (String s : videoPath) {
new YouTubeExtractor(context) { // THIS LIBRARY SHOWING WARNING
@Override
protected void onExtractionComplete(SparseArray<YtFile> ytFiles, VideoMeta videoMeta) {
if (ytFiles !=null){
int itag = 18;
String link = ytFiles.get(18).getUrl();
Map<String, Object> map = new HashMap<>();
map.put("Message", link);
String Temp_Key = databaseReference.push().getKey();
Map<String, Object> RoomKey = new HashMap<>();
databaseReference.updateChildren(RoomKey);
DatabaseReference message_Root = databaseReference.child(Temp_Key);
message_Root.updateChildren(map);
}
}
}.extract(s, true, true);
}
}
My question is how to solve this warning with this library. I don't want to use @SuppressLint("StaticFieldLeak")
which only suppress warning not resolve it.