THEOplayer / react-native-theoplayer

A React Native THEOplayerView component
https://theoplayer.github.io/react-native-theoplayer/
MIT License
65 stars 21 forks source link

Improvement/ Minor Android code improvement in MediaPlaybackService #330

Open kot331107 opened 5 months ago

kot331107 commented 5 months ago

As #325 is still unconfirmed I'd like to push this minor code improvement.

Tested in Android app for about last two weeks.

tvanlaerhoven commented 3 months ago

@kot331107 I remember now we had this shorthand code before; there is a compatibility issue with apps targeting API 33 and lower though:

ServiceCompat.startForeground was added in core-ktx 1.12 (), which requires target SDK 34. Although 34 will soon be required for store submissions, we see some customers are still targeting 33.

So maybe let's wait a bit before upgrading to 34 and core-ktx 1.12?

kot331107 commented 3 months ago

So maybe let's wait a bit before upgrading to 34 and core-ktx 1.12?

@tvanlaerhoven I'm down, you're correct 👍