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.

Sample app crash when using LocationProvider instead of minor

See original GitHub issue

Hello, if someone use the LocationProvider to get the location from api or based on the mac address ( and not from the minor ) the sample app will crash when pressing the chart button because he may get a negative value of minor and he cannot get a color from the materialDesignXColors array.

 @ColorInt
    public static int getBeaconColor(Beacon beacon, @ColorUtil.ColoringMode int coloringMode, int beaconIndex) {
        int colorIndex = 0;
        switch (coloringMode) {
            case ColorUtil.COLORING_MODE_INSTANCES: {
                if (beacon instanceof IBeacon) {
                    colorIndex = ((IBeacon) beacon).getMinor();
                } else {
                    colorIndex = beaconIndex;
                }
                break;
            }
...

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Steppschuhcommented, Jun 11, 2018

This should be fixed in PR #88. I’ve added your advertising data to the IBeaconTest.

0reactions
hadiidboukcommented, Jun 11, 2018

Sure here you go

Proximity UUID: 9114d61a-67d1-11e8-adc0-fa7ae01bbebc
Major: 25840
Minor: 36698
Advertising Interval: 625
RSSI @ 1m: -59
TX Power: 4dBm
Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Java App crashes when using location listener and ...
my android app crashes when I am trying to get the current location in java. I've watched many tutorials and tried like everything....
Read more >
Preview Crashes when using @FetchRequest
I'm trying to load items from the database into a list, it works fine on device and simulator but Preview will always crash...
Read more >
Changelog - lockito-app.com
Fix some bugs and crashes in edge-cases · Fix input speed being handle as m/s instead of km/h · Fix import with incomplete...
Read more >
Activity - Android Developers
If a child activity fails for any reason (such as crashing), the parent activity will receive a result with the code RESULT_CANCELED.
Read more >
App crashes at runtime when accessing a Kotlin class ...
The sample demonstrates how an application shrunk with R8 crashes when accessing a ... if that is a nested child class inheriting from...
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