Android Example MidiSystem Midi Monitor

Discussion in 'Tutorials & Examples' started by stevel05, Feb 1, 2015.

  1. stevel05

    stevel05 Expert Licensed User

    Attached Files:

    Volga likes this.
  2. Michael Wenning

    Michael Wenning Member Licensed User

    Hello steve05,
    i like your MidiMonitor and it works fine if it is compiled in Release mode.
    If i try to compile it with Release(obfuscated) it doesn't find the sub update
    and the sub send.

    Error Message:
    ** Activity (main) Create, isFirst = true **
    USB Midi Devices not found.
    Initialize!
    ** Activity (main) Resume **
    midimonitor_vv3 (java line: 190)
    java.lang.RuntimeException: Thread.Start : Sub update not found!
    at anywheresoftware.b4a.agraham.threading.Threading.Start(Threading.java:207)
    at com.stevel05.midimonitor.midimonitor._vv3(midimonitor.java:190)
    at com.stevel05.midimonitor.main._activity_resume(main.java:391)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at com.stevel05.midimonitor.main.afterFirstLayout(main.java:110)
    at com.stevel05.midimonitor.main.access$000(main.java:17)
    at com.stevel05.midimonitor.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6944)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
    java.lang.RuntimeException: Thread.Start : Sub update not found!

    Is it possible to compile your MidiSytem Libary again with subnames with underscores?
    Perhaps monitor_update and monitor_send...

    Perhaps you have another idea/solution for me?

    Best regards from Germany
    Michael Wenning
     
  3. stevel05

    stevel05 Expert Licensed User

    Hi Michael,

    If you are using the Midimonitor as part of your app, I would suggest compiling that class to a library and removing the code from your app. That way you can obsfuscate the rest of the app.
     
    Michael Wenning likes this.
  4. stevel05

    stevel05 Expert Licensed User

    If it helps, here is a version that implements a customview.
     

    Attached Files:

  5. Michael Wenning

    Michael Wenning Member Licensed User

    Hello Steve,
    I implemented your suggestion with the compiled code in the library.
    It works great.
    Many thanks for the help!
    Best regards
    Michael
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice