ACR Reactive BluetoothLE Plugin

AllanRitchieAllanRitchie CAInsider, University ✭✭✭

Easy to use, cross platform, REACTIVE BluetoothLE Plugin for Xamarin (Windows UWP COMING SOON)

This is an early preview version. API subject to change. Contributors Welcome!

  • Scan for Devices
  • Read/Write Characteristics & Descriptors
  • Subscribe to Characteristic notifications

source: https://github.com/aritchie/bluetoothle
nuget: https://www.nuget.org/packages/Acr.Ble/

Posts

  • pthaipthai Member

    I'm new in Xamarin. When I try to deploy your application in Samsung Nexus i have an error at
    RequestPermissions(new String[]
    {
    Manifest.Permission.AccessCoarseLocation,
    Manifest.Permission.BluetoothPrivileged
    }, 0);
    here the message:

    Java.Lang.NoSuchMethodError: no non-static method "Landroid/app/Activity;.requestPermissions([Ljava/lang/String;I)V"

    Can you help me to solve it.

    Thank you
    Phong

  • AllanRitchieAllanRitchie CAInsider, University ✭✭✭

    @pthai That is a Xamarin issue that occurs occasionally on a build. Try a clean/rebuild. If that doesn't work restart VS. If it still doesn't work, delete all of your bin/obj folders and try one last time.

    Please try to keep questions here related to the library going forward.

  • Suriya_KalidossSuriya_Kalidoss Member ✭✭✭

    Hi @AllanRitchie I can't able to read from the characteristic from your sample.Please guide

  • AllanRitchieAllanRitchie CAInsider, University ✭✭✭

    @Suriya_Kalidoss Please do a little bit of debugging to see what may be going on than provide a very detailed stack trace/log & reproducible sample on the github repo.

  • AllanRitchieAllanRitchie CAInsider, University ✭✭✭

    @Suriya_Kalidoss Please note that I'm not a support channel. If you provide full test cases with DETAILS on github, I can look into things. In this case, looking at your other post, you're registering for the notification AFTER the event has already taken place meaning that you've missed the event already.

  • Suriya_KalidossSuriya_Kalidoss Member ✭✭✭

    @AllanRitchie Thanks for the info. But I start working using your above easy sample.That's why I'm asking you. Ok let me post in Github

  • AllanRitchieAllanRitchie CAInsider, University ✭✭✭

    @Suriya_Kalidoss There is no bug here. I looked at your other post. You are having a logical error, not an issue with the library. Please read my last post.

    My point is, if you find an issue that is definitively with the library (ie. exception, log, reproducible sample), you should be filing on github.

  • Suriya_KalidossSuriya_Kalidoss Member ✭✭✭

    @AllanRitchie you are mentioning that I want to get notified before write code,am I right ?. Please correct if I'm wrong
    `private async void WriteCharacteristicAsync(IGattCharacteristiccharacteristic)
    {
    if (readcharecters.CanNotify())
    {
    readcharecters.EnableNotifications();
    readcharecters.WhenNotificationReceived().Subscribe(result => {
    var test = result.Data;
    });

    }
    

    string writetest = "LIST_DIR,audio";

        byte[] bytes = Encoding.ASCII.GetBytes(writetest);
    
        await characteristic.Write(bytes);
    

    }`
    is this correct.Advance Thanks.

  • Suriya_KalidossSuriya_Kalidoss Member ✭✭✭

    @AllanRitchie ok its difficult for me to trace my logical error. Please provide me the solution.Your information will be greatly helpful to me.
    AdvanceThanks

  • AllanRitchieAllanRitchie CAInsider, University ✭✭✭

    @Suriya_Kalidoss I have answered your question. You need to hook the notification before you write. Please be respectful of my time. Try what I've said and work through it.

    If you require something beyond this, I do offer paid consultancy.

  • Suriya_KalidossSuriya_Kalidoss Member ✭✭✭

    @AllanRitchie Thanks

Sign In or Register to comment.