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

  • I have the same issue and the same error message as Nurki but with more history that suggests the problem is due to a change in Processing.

    I've written many programs using Blepdroid and Processing version 3.2.3. These have worked perfectly for the last 18 months successfully accessing Blepdroid and presumably the fragment manager method that Blepdroid calls. The programs continue to run properly with newly installed versions of the SDK for 3.2.3 provided I also include my old Processing folder with its SDK folder. If I don't include the folder I get an error message saying that Android no longer supports this version of Processing

    With Processing version 3.3.7 and 3.4 I the same programs plus Blepdroid still build successfully but when run they give the Fatal exception error message: 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)

    Given Blepdroids previous history of working on early versions of Processing 3 and the fact that Blepdroid has not been changed in the last year I'm puzzled by the error message because if Blepdroid is calling on Processing (in Class Papplet) for FragmentManager then it must have been available in earlier versions. However, I couldn't find anything in the changes notes for Processing 3 that says it has been removed?

    Before I raise this as a possible Bug in Processing can anyone suggest whether the problem is more likely to be with Processing or alternatively that the problem is the need for an update in Blepdroid to match changes in Processing?

    Thanks for any advice, Peter

  • There is a new forum

    Maybe ask there and set a link to here

    Thanks

  • Will do, Thanks, Peter

Sign In or Register to comment.