Trying to make blepdroid to work

edited October 2017 in Android Mode

Hi, I am not very familiar with the android mode, but I need to use ble communication, so I was hoping to use the blepdroid library. I downloaded, and placed it in my library folder, opened the examples... and tried to run them. I don't have the rfduino that should be communicating with it, but was expecting it to just fail to connect.

However, the sketch can't run. It builds correctly, but I get a fatal exception java.lang.RuntimeException: Unable to start activity

I tried making a sketch with almost all the code stripped away to see if it works better. But it is enough that there is blepdroid = new Blepdroid(this); To make it not work (this time not finding the virtual method getFragmentManager())

Is there something fundamental that I need to set in this mode to make it work? Are the examples from this library supposed to work out of the box?

Thank you.

Tagged:

Answers

  • Hi nurki, Did you manage to solve this? I am having a similar problem but as I'm very new to this I doubt I'll solve it! I intend to use Bluefruit LE Friend.

  • @nurki===

    you have to put your error code and your p5 version.

    Supposing that you run 3.XX or more and guessing from your "getFragmentManager...." i suppose that this library was not updated for new android modes.

  • Sorry, no I have not solved it, and am looking for ways to work with ble not through processing :/

    There was some online remarks about trying older versions of the tools folder, but that made my SDK version not valid (it prompted me to download the SDK again).

    Processing 3.3 Android 26

    I didn't write any special code for this. Just tried the basic examples that came with the library.

    Error code (after successful build). There was a different error first, but then I erased the manifest and let it create a new one, and this is the second error.

    BUILD SUCCESSFUL in 10s 35 actionable tasks: 35 executed OK Blepdroid starting Blepdroid(PApplet _parent) FATAL EXCEPTION: Animation Thread Process: processing.test.hello, PID: 16208 java.lang.NoSuchMethodError: No virtual method getFragmentManager()Landroid/app/FragmentManager; in class Lprocessing/core/PApplet; or its super classes (declaration of 'processing.core.PApplet' appears in /data/app/processing.test.hello-1/base.apk) at blepdroid.Blepdroid.<init>(Blepdroid.java:293) at processing.test.hello.Hello.setup(Hello.java:57) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PSurfaceNone.callDraw(Unknown Source) at processing.core.PSurfaceNone$AnimationThread.run(Unknown Source)

  • edited November 2017

    @nurki===

    it seems to me that your error code means that it's looking for FragmentManager (and probably with something like getFragmentManager() then commits....) but not in the good place, i mean not in the android.core but in the processing.core where of course there is no method of this kind: as for me that is an error in the jar code of this lib.

    if you want to use ble you can also use the android ble API: here https://developer.android.com/guide/topics/connectivity/bluetooth-le.html

Sign In or Register to comment.