Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android ByteBuffer and Color fixes #842

Merged
merged 5 commits into from
Sep 16, 2023
Merged

Conversation

ButterscotchV
Copy link
Member

@ButterscotchV ButterscotchV commented Sep 8, 2023

This didn't compile/run fine on Android. Simple one-line fix, this should be equivalent functionality. Also as a small note, the limit(int) method returns Buffer instead of ByteBuffer, so it's just on a separate line as it affects the object it's called on.

This doesn't compile/run because the method used is only available in SDK 34 (Android 14).
https://developer.android.com/reference/java/nio/ByteBuffer#slice(int,%20int)

Also worth mentioning that this could've been avoided by compiling fully with Android, though I like our current structure... If we could have some way to compile :server:core with Android and with regular Java depending on which is requested, that would be nice.

@ButterscotchV ButterscotchV added Type: Bug Something isn't working Priority: High Important feature or blocks something important OS: Android Operating system: Android Area: Server Related to the server labels Sep 8, 2023
@ImUrX
Copy link
Member

ImUrX commented Sep 8, 2023

If we could have some way to compile :server:core with Android and with regular Java depending on which is requested, that would be nice.

i think i can do that, i have had something in my list to do it with kotlin multiplatform

@ButterscotchV
Copy link
Member Author

Also fixed OSC missing java.awt.Color now by a simple hack lmfao, Android Studio complains about it, but it compiles just fine!

@ButterscotchV ButterscotchV changed the title Android ByteBuffer compilation fix Android ByteBuffer and Color fixes Sep 9, 2023
@Erimelowo
Copy link
Member

Can’t OSCStatic and its usages be removed now?

@ButterscotchV
Copy link
Member Author

Can’t OSCStatic and its usages be removed now?

Yeah probably, I'm not sure if keeping this class in would cause any problems or not? I can do that in this PR if you would like.

@Erimelowo
Copy link
Member

I can do that in this PR if you would like.

yes please

@Erimelowo Erimelowo merged commit 3f30760 into SlimeVR:main Sep 16, 2023
6 checks passed
@ButterscotchV ButterscotchV deleted the android-fix branch September 16, 2023 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Server Related to the server OS: Android Operating system: Android Priority: High Important feature or blocks something important Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants