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

Is there somewhere a working Android example ? #77

Open
hannesa2 opened this issue Sep 23, 2024 · 11 comments
Open

Is there somewhere a working Android example ? #77

hannesa2 opened this issue Sep 23, 2024 · 11 comments

Comments

@hannesa2
Copy link
Contributor

I'm fighting with Android and run into multiple issues, so the general question arise:
Is there somewhere a running sample for Android ?

@hannesa2
Copy link
Contributor Author

When I use it
implementation "com.illposed.osc:javaosc-core:0.9"

android {
   ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }
}

It runs into

java.lang.NoSuchMethodError: No virtual method getDefinedPackage(Ljava/lang/String;)Ljava/lang/Package; in class Ljava/lang/ClassLoader; 
or its super classes (declaration of 'java.lang.ClassLoader' appears in /apex/com.android.art/javalib/core-oj.jar)
  at com.illposed.osc.LibraryInfo.<clinit>(LibraryInfo.java:46)
  at com.illposed.osc.LibraryInfo.hasStandardProtocolFamily(LibraryInfo.java:283)
  at com.illposed.osc.transport.udp.UDPTransport.<init>(UDPTransport.java:61)
  at com.illposed.osc.transport.OSCPort.<init>(OSCPort.java:40)
  at com.illposed.osc.transport.OSCPortIn.<init>(OSCPortIn.java:108)
  at com.illposed.osc.transport.OSCPortIn.<init>(OSCPortIn.java:123)
  at com.illposed.osc.transport.OSCPortIn.<init>(OSCPortIn.java:132)
  at com.illposed.osc.transport.OSCPortIn.<init>(OSCPortIn.java:145)
  at com.illposed.osc.transport.OSCPortIn.<init>(OSCPortIn.java:160)
  at com.illposed.osc.transport.OSCPortIn.<init>(OSCPortIn.java:170)

@hannesa2
Copy link
Contributor Author

Just for the records, when I use it
implementation "com.illposed.osc:javaosc-core:0.8"

It runs into

java.lang.ClassNotFoundException: Didn't find class "java.awt.Color" on path: DexPathList[[zip file "/data/app/~~TPKBDhW-PO6T_CQCzznfDQ==/info.hannesa2.osc-bnj0nyska4PediHZHIEerQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~TPKBDhW-PO6T_CQCzznfDQ==/info.hannesa2.osc-bnj0nyska4PediHZHIEerQ==/lib/arm64, /system/lib64, /system_ext/lib64]]
  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
  at com.illposed.osc.argument.handler.AwtColorArgumentHandler.getJavaClass(AwtColorArgumentHandler.java:43)
  at com.illposed.osc.OSCSerializer.<init>(OSCSerializer.java:101)
  at com.illposed.osc.OSCSerializerAndParserBuilder.buildSerializer(OSCSerializerAndParserBuilder.java:64)
  at com.illposed.osc.transport.channel.OSCDatagramChannel.send(OSCDatagramChannel.java:100)
  at com.illposed.osc.transport.udp.UDPTransport.send(UDPTransport.java:138)

@youlisse
Copy link

youlisse commented Oct 8, 2024

https://github.com/youlisse/Ircam

check that its only osc send from android in kotlin but might help

@hannesa2
Copy link
Contributor Author

hannesa2 commented Oct 8, 2024

Thanks for the hints. I've to receive in Android from outside the device and I've issues to receive something. Maybe it's an network ?

@youlisse
Copy link

youlisse commented Oct 8, 2024

if you think it could be the network and you dont have the hand on it try with your phone as an hotspot some network block udp message (like public network, company network ...)

@youlisse
Copy link

youlisse commented Oct 8, 2024

i also struggle implementing osc in :(

@hannesa2
Copy link
Contributor Author

https://github.com/youlisse/Ircam

check that its only osc send from android in kotlin but might help

Your repo is disappeared @youlisse
Image

@cormacstewart14
Copy link

@hannesa2 did you ever find a solution? I am trying to stand up an Android project using this library as well and have run in the the exact same issues that you described above.

@hannesa2
Copy link
Contributor Author

@cormacstewart14 Unfortunately no, I assume its an UDP issue. At least some google issues are pointing to this.
In my point of view an Android sample is missing here which tests it.
My current state is this https://github.com/hannesa2/OSC-android-server but till now I failed

@cormacstewart14
Copy link

@hannesa2 thanks for the reply... I think forking the repo could get it working but that isn't ideal

@hannesa2
Copy link
Contributor Author

What would be the ideal working situation, how can I help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants