hoijui / JavaOSC

OSC content format/"protocol" library for JVM languages
http://www.illposed.com/software/javaosc.html
BSD 3-Clause "New" or "Revised" License
156 stars 43 forks source link

StandardProtocolFamily requires Android API 24 #48

Closed Burtan closed 4 years ago

Burtan commented 4 years ago

Hey,

OSCPort makes use of java.net.StandardProtocolFamily but it's only available at Android API 24 and higher. Could we replace it? StandardSocketOptions has the same problems.

WimVriend commented 4 years ago

Hi Burtan,

It's even worse: when compiling with the 0.6 version, the compiler complains:

Invoke-customs are only supported starting with Android O (--min-api 26)

I am creating an App which I also want to use on older Android versions (min API 23). How do I do that?

Burtan commented 4 years ago

Ai, that makes it even worse. 0.4 is a version that is running with no problems under Android, however, there have been many improvements since and I would prefer to improve compatibility of the changes with android. Regarding the missing classes they could be checked for and run alternatives under Android.

No idea about Invoke-customs yet. I just tried compiling for API 29 with target API 29 and min sdk API 29 and it works fine on emulator with API 25.

I think API 21 as min sdk is a must right now (5.0 introduction of material design)

WimVriend commented 4 years ago

I also 'downgraded' to 0.4 and now it works with API 23. I did run into the problem where you are not allowed to send messages on the UI thread (which of course I did to test stuff...)

For my intended purposes 0.4 works, so I will stick with that.

Burtan commented 4 years ago

I've created a pull request which should fix the android problems. At least my local test on my use case works.

Burtan commented 4 years ago

Any news on this? Would be nice to have a new version with better android compatibility.

hoijui commented 4 years ago

hey.. sorry! i was .. busy. ;-) lets see this through now!

hoijui commented 4 years ago

solved by https://github.com/hoijui/JavaOSC/pull/49 thank you @Burtan ! :-)