NewPipeExtractor
NewPipeExtractor copied to clipboard
Use Locale.forLanguageTag().
- [x] I carefully read the contribution guidelines and agree to them.
- [x] I have tested the API against NewPipe.
Use Locale.forLanguageTag()
as NewPipe now requires API level 21.
NewPipe now requires API level 21.
Does the extractor also require API level 21 too?
NewPipe now requires API level 21.
Does the extractor also require API level 21 too?
At the moment it requires API level 19 (due to using the StandardCharsets
class).
Then this PR would raise that requirement to 21, right? Do we want that?
I don't think so, as some apps use the extractor on lower APIs, such as SkyTube.
The question is: does this method would be available with the desugar library based on Java 11?
I don't think so, as some apps use the extractor on lower APIs, such as SkyTube.
Oh, right. In that case, changes will need to be made as StandardCharsets
requires API level 19 (though it seems like it'll be supported in desugar: https://github.com/google/desugar_jdk_libs)
The question is: does this method would be available with the desugar library based on Java 11?
Probably? I checked using the Android Studio preview and it didn't seem to be available. I created an issue for it a while ago: https://issuetracker.google.com/issues/171182330
Then this PR would raise that requirement to 21, right? Do we want that?
If I understand correctly, the purpose of this PR is actually to prevent raising the requirement to 21, while being able to use LocaleCompat.forLanguageTag()
Then this PR would raise that requirement to 21, right? Do we want that?
If I understand correctly, the purpose of this PR is actually to prevent raising the requirement to 21, while being able to use
LocaleCompat.forLanguageTag()
The idea was to eventually switch to Locale.forLanguageTag()
if/when it becomes available via desugaring.
I think it's better if you avoid reflection. We can use our own implementation until the real one becomes available