question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UpdateRssiAsync() skip code

See original GitHub issue

Steps to reproduce

var rssiUpdateResult = await device.UpdateRssiAsync();
if (rssiUpdateResult)
{
      this.RssiUpdateEvent?.Invoke(this, new RssiUpdateEventArgs(device));
}
Debug.WriteLine("RSSI - UpdateMethodCallFinished : " + rssiUpdateResult;

Expected behavior

I update the RSSI value from my device with the method device.UpdateRssiAsync(). With an if-condition I fire an event, if the method return true. After the if-condition, I send a message to the console.

Actual behavior

Every line of code, after the method don’t execute. I set breakpoints and the programm stops at the line of the UpdateRssiAsync method call, but it doesn’t stop at the if-condition or the WriteLine method. Additionally I can’t find any output from the WriteLine method.

In the console output, I can see the rssi value from the mvx:Diagnostic.

Configuration

Version of the Plugin: v4.0.30319

Platform: PCL / Android 6.0

Device: Samsung SM-A500FU

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
smsissuecheckercommented, Apr 3, 2017

Hi @SeanStayn,

I’m the friendly issue checker. It seems like (100.00 %) you haven’t used our issue template 😢 I think it is very frustrating for the repository owners, if you ignore them.

If you think it’s fine to make an exception, just ignore this message. But if you think it was a mistake to delete the template, please close the issue and create a new one.

Thanks!

0reactions
daniel-streeteccommented, Sep 20, 2021

Hi, I can confirm that using 2.1.2 and Samsung Galaxy S10 the function will never return and any code execution is blocked.

if (this.BLEDevice.State == Plugin.BLE.Abstractions.DeviceState.Connected) { await this.BLEDevice.UpdateRssiAsync(); return this.BLEDevice?.Rssi ?? -1; } else { return -1; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

UpdateRssiAsync() skip code · Issue #183
I update the RSSI value from my device with the method device.UpdateRssiAsync(). With an if-condition I fire an event, if the method return ......
Read more >
Code execution skipped while requesting for token
Update. It turns out the actual cause for 'skipping' the rest of the method was accidentally not awaiting the call to GetSpeechServiceToken ......
Read more >
Bluetooth Low Energy (BLE)
The Component generates all the necessary code for a particular Profile/Service operation, as configured in the GUI. The following table lists the supported ......
Read more >
Xamarin.Forms cross-platform mobile app can advertise, ...
I am working on a Xamarin.Forms (version 4.8.0.1687) cross-platform app that needs to be able to talk to other instances of itself using ......
Read more >
Plugin.BLE 2.1.3
Xamarin plugin to access Bluetooth Low Energy functionality on Android and iOS. Read the full documentation on the projects page.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found