Android Question How to work with an all-in-one device

Discussion in 'Android Questions' started by GaNdAlF89, Jul 23, 2015.

  1. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    HI, I have this device: http://www.wizarpos.com/en/pro1.html
    My question is, how I have to work with its components via code? Example: they aren't connected neither via bluetooth nor usb, how can I communicate with them? Thanks a lot.
     
  2. hogiebaer

    hogiebaer Active Member Licensed User

    normally wlan oder lan
    there should be a sdk for the unit components u have to wrap
     
    GaNdAlF89 likes this.
  3. DonManfred

    DonManfred Expert Licensed User

    Maybe SERIAL
    [​IMG]

    Yes, i think there is one. See this.
     
    GaNdAlF89 and lemonisdead like this.
  4. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    @Erel What do you think about?
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    You will need to wrap their SDK (or use JavaObject to access it).
     
    GaNdAlF89 likes this.
  6. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

  7. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    @Erel
    I've created the jar and xml file with SLC, I selected it from the Libs tab but I don't know how to continue to work with the library...can you help me please?
     
  8. DonManfred

    DonManfred Expert Licensed User

    This is a community forum. Dont limit your question to a single member...

    mark the library in your b4a project in the libs tab and then you can use it
     
  9. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    Obviously already done, but I don't see the type of objects when I use Dim...
    I hope to explain..
     
  10. DonManfred

    DonManfred Expert Licensed User

    without seeing your library code it is hard to give advices.... If you did it right then is should appear in b4a when dimming....
     
  11. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    When I compile with SLC I obtain warnings like this:

    "Working with class: com.wizarpos.apidemo.jniinterface.PrinterInterface
    No ShortName annotation found for class: PrinterInterface"

    @DonManfred Maybe is this the problem?
     
  12. DonManfred

    DonManfred Expert Licensed User

  13. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    How can I solve it? Thanks
     
  14. vecino

    vecino Well-Known Member Licensed User

    Hello, what is SLC?
     
  15. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    @Erel How can I solve this problem? I tried to add "@ShortName("PrinterInterface")" to java file but I obtain this error:
    "error: cannot find symbol
    @ShortName("PrinterInterface")
    ^
    symbol: class ShortName
    Note: Some input files use or override a deprecated API."
     
  16. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    Solved. I found out that it is necessary to add "import anywheresoftware.b4a.BA.ShortName;" to java file before @ShortName("...")
     
  17. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    Now I have this problem when executing app:

    Code:
    main_globals (java line: 290)
    java.lang.NoClassDefFoundError: com.wizarpos.apidemo.jniinterface.PrinterInterface
        at b4a.example.main._globals(main.java:
    290)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    511)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    169)
        at b4a.example.main.initializeGlobals(main.java:
    230)
        at b4a.example.main.afterFirstLayout(main.java:
    86)
        at b4a.example.main.access$
    100(main.java:16)
        at b4a.example.main$WaitForLayout.run(main.java:
    74)
        at android.os.Handler.handleCallback(Handler.java:
    605)
        at android.os.Handler.dispatchMessage(Handler.java:
    92)
        at android.os.Looper.loop(Looper.java:
    137)
        at android.app.ActivityThread.main(ActivityThread.java:
    4424)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    784)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    551)
        at dalvik.system.NativeStart.main(Native Method)
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    You need to use @DependsOn to tell the compiler that your library depends on another jar.
     
  19. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    How can I know what (and where) is this jar? Sorry but this sdk has a lot of files, and this is very confusing for me...
    I ask for your help, the following link is the complete sdk, can you say me which files I have to include, and the relative dependencies?
    https://www.dropbox.com/s/j6kgqpdt4gg7mlm/M680(WIZARPOS)_SDK_v0.9.9.5_2015-01-15.zip?dl=0

    Thanks for all
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    You probably need to add these two jars:
    Code:
    @DependsOn(values={"barcodedecoder-r12937""barcodescanner-r13195"})
    Make sure to copy these files to the additional libraries folder.
     
Loading...