Documention Needs cleaned up!!!!

SphereLink

Known Issues:

[can we shorten the display text of the link?]

The google code Scanner:

https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelopers.google.com%2Fml-kit%2Fvision%2Fbarcode-scanning%2Fcode-scanner%23%3A~%3Atext%3DAdd%2520the%2520Google%2520Play%2520services%2520dependency%2520for%2520the%2Cis%2520commonly%2520app%252Fbuild.gradle%253A%2520dependencies%2520%257B%2520implementation%2520%2527com.google.android.gms%253Aplay-services-code-scanner%253A16.0.0%2527%2520%257D&data=05%7C01%7Cjeremyberry%40mail.umkc.edu%7C52a29a4ae0c1454b8c6908db4dad365b%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638189178605862338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=F9CpiNSe1eVckMxSxf6q1YyqF1oKR8qxi51Vexb9L3k%3D&reserved=0

Issue: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissuetracker.google.com%2Fissues%2F261579118%3Fpli%3D1&data=05%7C01%7Cjeremyberry%40mail.umkc.edu%7C52a29a4ae0c1454b8c6908db4dad365b%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638189178605862338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FrfdQZDZtcUqOE2w0jthhWZnq0cMEbB9mXbkjCCZbCk%3D&reserved=0

How to clear data from an app: (If you experience the issue): https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.google.com%2Fgoogleplay%2Fanswer%2F9037938%3Fhl%3Den&data=05%7C01%7Cjeremyberry%40mail.umkc.edu%7C52a29a4ae0c1454b8c6908db4dad365b%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638189178605862338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NT0o%2FktBL0WJ6yR4MbV3Cslo%2BdZeOIHtegR4dhLHI%2Fs%3D&reserved=0

[Could be optimized for batter life]

[persistant permission request after permission has been granted]

[connection issues if device has some how become bonded, dont bond the device!]

[occasional bluetooth connection issues, try restarting esp32. if doesnt work during testing some bluetooth component crashed and had to restart phone to fix.]

Notification Service [has a bug, waiting to resolve prior to creating pull request.]

A notification service is added to notify the user in case the connected BLE device goes beyond certain threshold distance. The service take a threshold distance, say 10 meters, if the esp32 device goes further than 10 meters the service will send a notification/alert stating that the device is gone beyond 10 meters.

Verification the service properly is started: WhatsApp Image 2023-05-05 at 6 47 06 PM

Branch: (verify this branch) https://github.com/twobit-five/SphereLink/tree/imran_master

May eliminate additional service and call logic as distances are calculated from the DistantCalculator class to create notification directly.

Description:

The purpose of this app is to track distances of BLE devices. [why did we create this, what s it for?] [connects to many devices by scanning barcodes]

Architecure and Design

image

[one to many design. ie one phone to many esp32 devices.]

[keywords to use MVVM, room data base?, kotlin, jetpack compose, dagger hilt dependency injection]

[MVVM design used with navigation for implementation of UI]

[Give details about how distance is calculated]

[How often is distance calculated, how often are rssi values taken? how many?]

[3 database tables and there purpose]

[General Overview of the classes maybe?]

[Brief over view of the classes in the domain path]

[focus on describing the classes in the bluetooth and distance paths. Note distance calculation does more than the name. probably should be renamed]

ESP32 Device

[Add description give details about the battery service, currently remember this value is random and not actual batter life, also this isnt being updated properly. Only upon connect]

Repo: https://github.com/twobit-five/esp32-Device

thumbnail_image009

Device List Screen

[Add Description of this screen and screenshot] [what do the buttons do?]

Device Details Screen

[Add Description of this screen and screenshot]

Add Device Screen

[Add Description of this screen and screenshot]

QR code Scanner [Section]

[Add Description of this screen and screenshot]

[choose to use the qr scanner libray due to ease of implementation]

[less permission since google handles it]

Future Work

[possibly a different section, but devices can only maintain so many connection to ble devices. perhaps 7-10 maybe 20 ish? IDK verify. But this is a limitation of the App]

[implement actual battery levels]

[sound bracelet device when out of range???]

[optimize batter]

[add bonded device logic for faster reconnects and encryption during transmission]

[Bad wording but, setting preferred phy on connected devices to LE Coded (on both ends), gives better reliability and greater distances at the cost of trasmission rate]

[improving calculation by some how using trianglution or possibly feature from ble 5.1 AoA and AoD] [dual support uwb devices and ble devices, uwb provides better accuracy but only available on newer devices.]

https://developer.android.com/guide/topics/connectivity/uwb

[Notification System] [could use stats from rssi stats table to ensure within certain probabitity the distance threshold has been exceeded prrior to creating the alert]

[Settings Ui for customization of, distance threshold, interval, delay between readings etc]

[Additional service which could help us in determining the calibruated vale for base rssi]

[implemting unit tests]

[better looking ui to present data]

[Add rssi stat graphs for additional details from the device details screen]

[Add graph which visualizes device ranges from main screen. ie device can be viewed in list or in a visual way.]

[Utilize GPS to indicate moving speed, could be used to determine the interval which rssi values are collected.]

[Use trending values to determine whether moving towards or away. Could be used as part of notification logic to determine whether or what alert/notification is created.]

[How could machine learning be trained to assist when notification are created with GPS data, magnetometers (compass) and gyroscopes, accelerometers, rssi trending data, rssi stats, previous rssi stats (could make inferences about whether becoming more accurate, closer etc), dist calc etc.?]

[ability to pause notifications for a specific device. possibly for a period of time]

Test Results:

[Describe testing enviroment]

[Can we give an indication of the accuracy of each test, with a short description?]

15 ft - (4.572)

thumbnail_image

45ft - (13.7m)

thumbnail_image

75ft - (22.86m)

thumbnail_image

90ft - (27.432m)

thumbnail_image

Some of the most resources for our Inspiration and Credits

MVVM Architecure:

https://www.youtube.com/watch?v=A7CGcFjQQtQ&t=4636s

Notifications:

https://www.youtube.com/watch?v=LP623htmWcI&t=1285s

Dependency Injection:

https://www.youtube.com/watch?v=bbMsuI2p1DQ&t=423s

Resolution to dependency Issue (Beginning of Project):

https://stackoverflow.com/questions/75883656/dependency-issue-with-android-project

Permission Handler:

https://www.youtube.com/watch?v=D3JCtaK8LSU&t=1066s

And many more...

[add others as they are rediscovered]

Pictures (Remove after moving pictures to sections)

thumbnail_image006 Screenshot_20230504-161833_SphereLink thumbnail_image010 thumbnail_image011