Coder Social home page Coder Social logo

schollz / find3-android-scanner Goto Github PK

View Code? Open in Web Editor NEW
123.0 15.0 56.0 314 KB

An android app that scans Bluetooth and WiFi for FIND3

Home Page: https://www.internalpositioning.com/doc/tracking_your_phone.md

License: MIT License

Java 100.00%
indoor-positioning android-app find3 wifi bluetooth scanning

find3-android-scanner's Introduction

FIND3 Android App

This is the open-source minimal Android app for using with FIND3. This app will allow you to use your phone to perform constant scans of Bluetooth and WiFi signals and levels that can be associated with certain locations in your home to allow internal positioning.

To get started with this app, use Android Studio 3+ and "Import Project" after downloading the Git repository.

Get it on F-Droid Get it on Google Play

Roadmap

  • Get locations for a family after it is typed in, and use those for autocompletion.

Documentation

https://find3.internalpositioning.com/doc/tracking_your_phone.md

License

MIT

find3-android-scanner's People

Contributors

poussinou avatar schollz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

find3-android-scanner's Issues

WiFi scan throttling limitations

https://developer.android.com/guide/topics/connectivity/wifi-scan#wifi-scan-throttling

The following limitations apply to the frequency of scans using WifiManager.startScan().
Android 8.0 and Android 8.1:
Each background app can scan one time in a 30-minute period.
Android 9:
Each foreground app can scan four times in a 2-minute period. This allows for a burst of scans in a short time.
All background apps combined can scan one time in a 30-minute period.
Android 10 and higher:
The same throttling limits from Android 9 apply. There is a new developer option to toggle the throttling off for local testing (under Developer Options > Networking > Wi-Fi scan throttling).

On Android 9 having a foreground service is not enough. This is going to be tough. I'll investigate alternatives (even strong one, such as something with root โ˜ ๏ธ ).

No Data Found in FIND3 default server (cloud.internalpositioning.com)

Expected Behavior
I'm assuming that i can see all my locations in the FIND3 dashboard, similar to the FIND

Actual Behavior
After opening the FIND3 dashboard i dont see any location which i have learned previously. All i can see is the loader (Progress Icon) keeps loading and no value after waiting so long

Steps to Reproduce the Problem

  1. Download FIND3 android app
  2. Fill the text field for Family, Device and Location and then tap on 'Tracking' button
  3. Now tap on 'Start Scan' and wait for sometime
  4. After some time, now tap on the above link which points to "Cloud.InternalPositioning.com"

Specifications
Version: FIND3 current version in the play store
Platform: Android
Subsystem: N/A

Android App is connecting but now writing any data?

Hi I am using this project for students to educate them. However suddenly the android app is not writing any wifi finger prints to the databse. I can not track it. When I change the port - it says can not connect - but when i keep 8005 is doesn't write. Any idea's?

Explain terms like family within the app

So far the term family is only explained on the webpage. But not in the app.

The app should explain all fields within the app, for ease of use and faster adoption.

Certain questions should be answered:

What is the purpose of the field.
For whom is the data in the field. Who interprets it? (Humans or the program)
Who sees the data/where is it stored.

Unable to track using FIND3 android app

Expected Behavior
FIND3 android app should be able to track and get my location.

Actual Behavior
After learning for about a minute, when I tap on start scan in tracking mode, I don't see my location after waiting for almost a minute.
Family name miraclemonster

Steps to Reproduce the Problem

Download FIND3 android app
Fill the text field for Family, Device and Location and then tap on 'Tracking' button
Now tap on 'Start Scan' and wait for sometime
Change to tracking mode and tap on start scan
It says running but no location gets printed..

Version: FIND3 current version in the play store
Platform: Android
Subsystem: N/A

https://drive.google.com/folderview?id=1Gc1ytizx8hq3Dz_WThbE0-AJNfqYhffn

Catch-all exceptions make for bad UX (need to ensure http:// on server)

I followed the server-via-docker setup and entered as URL 192.168.1.1000:8005.

If I go to localhost:8005 on the server, and enter the family that I put into the phone, it says that family doesn't exist.

If I go manually to /view/dashboard/myfamily, it loads the page but says at the top. You need to add learning data first: group 'mygroup' does not exist, despite me having learned 5 locations already.

If in the app I press the link shown at the top, I get to FIND dashboard, it shows myfamily / mydevice, but the Location guesses just shows the logo with the orange square circling around.

In the adb logcat I see:

03-26 14:15:19.572 10394 10507 E Volley  : [524] NetworkDispatcher.processRequest: Unhandled exception java.lang.RuntimeException: Bad URL 192.168.1.100:8005/data
03-26 14:15:19.572 10394 10507 E Volley  : java.lang.RuntimeException: Bad URL 192.168.1.100:8005/data
03-26 14:15:19.572 10394 10507 E Volley  : 	at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:171)
03-26 14:15:19.572 10394 10507 E Volley  : 	at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:120)
03-26 14:15:19.572 10394 10507 E Volley  : 	at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:87)
03-26 14:15:19.572 10394 10507 E Volley  : Caused by: java.net.MalformedURLException: Protocol not found: 192.168.1.100:8005/data
03-26 14:15:19.572 10394 10507 E Volley  : 	at java.net.URL.<init>(URL.java:176)
03-26 14:15:19.572 10394 10507 E Volley  : 	at java.net.URL.<init>(URL.java:125)
03-26 14:15:19.572 10394 10507 E Volley  : 	at com.android.volley.toolbox.HurlStack.executeRequest(HurlStack.java:92)
03-26 14:15:19.572 10394 10507 E Volley  : 	at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:131)
03-26 14:15:19.572 10394 10507 E Volley  : 	... 2 more
03-26 14:15:19.592 10394 10394 E ScanService: com.android.volley.VolleyError: java.lang.RuntimeException: Bad URL 192.168.1.100:8005/data
03-26 14:15:19.644 10394 10521 D ScanService: started wifi scan
03-26 14:15:19.644 10394 10521 D ScanService: started discovery
03-26 14:15:20.703 10394 10394 D ScanService: timer off, trying to send data

So there are 3 problems here:

They these locations use code like

                } catch (Exception e) {
                    Log.e(TAG, e.toString());
                }

Catching all exceptions is a well-known antipattern in Java; turning all exceptions into mere warnings and then continuing makes for bad UX because the program cannot work that way.

I suspect that this error is triggering the code path where the exception is thrown here and this catch-all` catches it and the app continues despite error.

Incompatible with the popular Android devices

The app supports min SDK 23, which is incompatible with some of the popular Android devices such as Galaxy J2, J1 Ace, Grand Prime, and Oppo A37f. These Android devices support min SDK 22. You can either decrease the SDK support of the current APK or provide multiple APK support.

New logo / icon

Hi, I am a graphic designer, I want to help others in graphic design.

After I reviewed your project, you have no logo on this project. Therefore I want to contribute to this project by creating a new logo / icon. what do you think?

Inconsistent Scanning Rates

Hey all,

I've run into some interesting behavior with how often the app reports scans (points?) to the server:

In tracking mode, after hitting Start Scan, it may take up to a minute for the app to begin reporting to the server ("X seconds ago: added X bluetooth and X wifi points"). Once it starts reporting, the following behavior follows:

  1. Keep screen alive, and app open, for about 30 seconds. Typically every 10 seconds, the app will report to the server. However, this sometimes varies up to 15 or 20 seconds on occasion.
  2. For exactly four reports, everything works fine.
  3. After the fourth report to the server, the app does not report to the server for at least another 30 seconds, up to a minute.
  4. After 30-60 seconds, the app will report.
  5. After another four total reports, the process repeats.

I've disabled WiFi Scan Throttling in dev options, disabled battery optimizations for the app, and have set the Location permission to Allow all the time.

This happens with the app in both foreground and background.

I'll be able to test further in the morning, but so far, it's been a head-scratcher.

My setup:

  • Self-hosted server using Docker inside a Debian VM, on LAN
  • Debian VM has 4GB RAM and 64GB storage (resource usage doesn't seem to be a problem, 52GB free storage space, always at least 3GB free RAM, and CPU never reaches above 20% with 2 cores allocated).
  • Samsung Galaxy S10 Plus, Android 10

The limit of four scans is awfully coincidental with the WiFi throttling limits:

Each foreground app can scan four times in a 2-minute period

But WiFi throttling is disabled in dev options (I triple checked), and it's limited to a one-minute period, not two-minute. Maybe Android has a hard-set, 1-minute limit?

Thanks!

The cloud.internalpositioning host is down :)

First of all i want to congrazz you for the work that you did...

I tried the sample app for Android.. and the app was not able to post the wifi fingerprints. The error that i see is cannot connect to server, fingerprints will not be uploaded

Screen randomly wakes

I just tried this app out yesterday (we already talked: https://news.ycombinator.com/item?id=16674745) :)
and liked it a lot. What bothered me in the night was that the screen was randomly waking (maybe every 20 minutes?)
I uninstalled the app and my phone stopped waking me up again, so I guess it was this app (otherwise hard to attribute)

I'm on Android v7.1.2 with lineageOS

Autostart Tracking / Tasker Integration

I would like to be able to start and stop tracking through Tasker. The ideal way of going about this would be to have FIND3 be available as a plugin through Tasker, but a fallback if that is not feasible would be an intent to start tracking. Tasker can send intents, so if there was one to start tracking, I could use that when I wanted to start.

Is the app dead ?

can not be found on Google play store a
nd the F-Droid vesion does not seem to be installable.

Securelly delete locations from database

Hi.

I was wondering if there is a way to securelly delete a location without deleting the whole database.

Is not the first time that I started learning a location and forget that my device is learning, moved from this place without turning off the learning, and this location got a lot of wrong data.

I know it's my fault :)

To remove this location I have deleted a record from the table locations, and all records from the table sensors where locationid was the id of the deleted location.

In addition, I have deleted records with empty locationid on the same table.

I don't know if this is ok or if may be the world will implode :D

Thanks!

802.11mc WiFiRTT

Was just curious if FIND is capable of using WiFi rtt to get better results?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.