Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Position Update Issues #11

Open
mimminito opened this issue Jan 5, 2018 · 13 comments
Open

Position Update Issues #11

mimminito opened this issue Jan 5, 2018 · 13 comments

Comments

@mimminito
Copy link

Prerequisites

  • [X ] Put an X between the brackets on this line if you have done all of the following:
    • My beacons have Estimote Location packet enabled (Check it in the Estimote Cloud, or via app)
    • My Android device/devices supports BLE and has Android OS version >= 5.0.0
    • My Android device/devices have bluetooth enabled
    • My app has Location Permissions granted

Basic information

Estimote SDK version: Indoor SDK 2.0.1

Android devices affected: Samsung Galaxy S8+

Android OS version affected: 7.0

Beacon hardware version: [Paste here your beacons hardware version (you can check that in Estimote Cloud).] I1.2

Description

When using the Estimote Indoor Location SDK I am not getting updates on Android properly. When I start positioning updates I first get an initial position which is roughly correct, but all updates after that are the same position no matter where I move the device. This occurs in both my custom app and when building the example in this repo.

Steps to reproduce:

  1. Load up example app
  2. Select a location
  3. Start positioning
  4. Updates are not correct

Expected behavior:
The SDK should report back correct position updates like it does on iOS

Actual behavior:
It does not report back correct position updates.

@pawelDylag
Copy link
Contributor

Hey @mimminito

My first guess is that there is a scanning problem on Samsung Galaxy S8 - I will verify it, but you can help me by launching your app on any other Android 5.0+ phone and checking if it works correctly.

Cheers!

@mimminito
Copy link
Author

@pawelDylag I have tried this on a Samsung Galaxy S6 and I am getting the same issues. The first callback reports a rough position and the rest of the reports are coming back as that same value. Stopping and starting the positioning service repeats this issue.

@yushakareem
Copy link

Hi guys! I've just recently started playing with the estimote beacons. I also tried running the example in this Repo.
It worked on Samsung Galaxy S6 (Android version 7.0)
It worked on Samsung Galaxy A5 (Android version 7.0)
It did not work on Google Pixel 2 xl (Android version 8.1.0)
It did not work on Google Pixel 1 (Android version 8.1.0)

The example works just as described by @mimminito. I was expecting it to work .. as it can be seen in this youtube video https://www.youtube.com/watch?v=9cH44pE1Fks. :)

P.S: Could test on different phones. Thanks to my family members having different ones :)

I am a beginner ... any tips or suggestions (for overall elegant working of Indoor location app) from you both (@pawelDylag @mimminito ) would be great for me :)

@mimminito
Copy link
Author

@pawelDylag Any update on this? Could really do with an answer to this issue.

@pawelDylag
Copy link
Contributor

Hey @mimminito and @yushakareem

I have tested the version 2.0.1 with our example app, on Google Pixel 2 (8.1.0), Samsung S6 (7.0.0), and Nexus 6P (7.0.0). Everything works fine with our office location. I am really curious about your problem, because I couldn't reproduce it on any phone. To sum things up:

  1. Your bluetooth is OK - the initial location is displaying, so it must be working properly.
  2. The algorithm is being updated every 1s with the new scan data, so if there is no change, I suspect there are problems either with new scans, or your location beacons are not properly set up.

Could you please let me know how many beacons does your location have? And also what are the distances between them?

We will figure it out,
Paweł

@mimminito
Copy link
Author

Hi @pawelDylag

Yes bluetooth is fine, and as you said we get the initial position back but from then on the same data comes back every time during the scan callbacks.

Are you able to access our location data on our account so you can view the setup yourself? This location works fine on iOS just not on Android.

It would be great if you could send me the APK you have tested so I can install that on my device to ensure there are no build issues?

Thanks,
Adam

@pawelDylag
Copy link
Contributor

pawelDylag commented Jan 25, 2018

Hey @mimminito

Could you check the version 2.1.0, please? If your problem still occurs, please enable debug logging like this:

// since version 2.1.0 there is a fourth parameter for enabling debug logging
val debugLogging = true
indoorLocationManager = 
        IndoorLocationManagerBuilder(appContext, location, cloudCredentials, debugLogging)
                .withScannerInForegroundService(notification)
                .build()

And send us logs from your scanning then :)

Regards,
Paweł

@yushakareem
Copy link

Hey @pawelDylag @mimminito !
Here are some updates from my side.

Firstly, just as @pawelDylag tested, with version 2.0.1.
The example app is working. I have tested on google pixel 2 xl (8.1.0) and an LG phone (5.0).
Although, note that, the example-app is not using the inertial sensors for its localization algorithm, hence the value of orientation is always zero and the x,y coordinates just change their values in 'straight lines', ie, from one beacon to another. (@pawelDylag can correct me if I am wrong)

I have a new question though:
Q. By comparing the android-example-app with the indoor-location-ios-app. I've noticed that, the android-example-app is working in a "standard" way (in the ios-app there are options of choosing "standard" or "with inertial-sensors included" or "with AR-kit included" in the localization algorithm).
So :) .. my question is, Can I use some function in the indoor-location-sdk, that can enable the use of inertial sensors for localization in the example app?

Side Note:
Oh! also @pawelDylag, In my 'build.gradle' file, I did, compile 'com.estimote:indoorsdk:2.1.0'. But the new class IndoorLocationManager does not show up. Its an Interface, as it was in 2.0.1.

Thank you
Kind regards
Yusha

P.S:
@pawelDylag .. I read your entire "short" story on Medium. It was awesome ... very well written!!
You have hooked me on the power of using Kotlin+RxJava ... Thank you!! :D

@pawelDylag
Copy link
Contributor

pawelDylag commented Jan 26, 2018

Hey @yushakareem

  1. There is no inertial sensors in Android SDK unfortunately. This feature is yet to be added, but for now our SDK reports orientation as 0.0 no matter what. We got this task scheduled, but due to the large amount of work I can't say when it will be added. Probably when more people will ask about this, our product owners will put a priority on this and will let us work on it ^^

  2. No, there is no secret "switch" between modes in Android Indoor SDK. The iOS version is much more robust because it has been developed for much longer time than our Android stuff. We still need to catch up with all those features (orientation, location view rotation and scaling, improved algorithms, etc). We're be adding this over time in not-so-distant-future ;) Stay tuned!

  3. @yushakareem I pasted the wrong snipped by a mistake. I edited the post. This should obviously look like this:

// since version 2.1.0 there is a fourth parameter for enabling debug logging
val debugLogging = true
indoorLocationManager = 
        IndoorLocationManagerBuilder(appContext, location, cloudCredentials, debugLogging)
                .withScannerInForegroundService(notification)
                .build()

P.S: Thanks a lot for kind words! Kotlin + RxJava2 combo is super effective :) 🚀

Regards,
Paweł

@yushakareem
Copy link

@pawelDylag Thank you!!
Will stay tuned :D

Kind regards,
Yusha

@HubITgr
Copy link

HubITgr commented Mar 3, 2018

Hello, I also experience the same issue, even with the example. When my tablet (samsung galaxy tab 2, Android 7.0) locks the screen the onPositionUpdate starts working with new values, when I resume the app it works for 10 seconds and then I get the same results. The position gets updated after 10 seconds if I am near a beacon.

@Fenetik
Copy link

Fenetik commented Apr 17, 2018

same issue with S5 with Android 6.0.1 while running the indoorsdk:2.1.0
When changing the location during runtime, this issue seems to "solve itself", because in the new location the positioning seems to work fine although it seems like multiple instances of indoorManager are working at the same time because updates are coming in faster than before (before they were coming every second and afterwards twice per second)

@ghost
Copy link

ghost commented Sep 27, 2018

I was facing same issue.
I fixed the issue by downgrading sdk version to 2.5.3
Also I have taken one textView to get x, y coordinates and updated method as below:

override fun onPositionUpdate(locationPosition: LocationPosition) {
indoorLocationView.updatePosition(locationPosition)
runOnUiThread {
txtVwLocationCords.setText("x: " + df.format(locationPosition.x)+ "\n" +"y: "+ df.format(locationPosition.y))
}
}
Although it's not smooth as ios version.
I am using samsung j7 device.
Happy coding :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants