bellafaire / android-companion-app-for-ble-devices Goto Github PK
View Code? Open in Web Editor NEWProvides an open source app which can send phone notifications and control phone functions over BLE
License: MIT License
Provides an open source app which can send phone notifications and control phone functions over BLE
License: MIT License
Thanks for this project. My device, a Note 8, runs a new project in Android Studio, but I get this error when I import this project. It won't allow me to select my device or any device to run the project.
4:32 PM Gradle sync failed: com.android.tools.idea.gradle.project.sync.idea.issues.SdkPlatformNotFoundException: Module: 'app' platform 'android-29' not found. (22 s 383 ms)
Hello. I'm using your app to get notifications. I wanna be able to also get call notifications and I'm gonna add a small vibration motor to it so that I'm notified with haptics. Is it possible to get call notifications?
Huge thanks for your work!
Trying to install the companion app but after installing and trying to open the app it just crashes immediately. Any way to fix this or a work around to get it started? Thanks
Hi, I've managed to get the watch connected with the phone (The square on the top right is green and I've granted notification permission). The phone says that it sends the data (the weird thing is, the status is nothing, see the picture)
This is what appeared on the Serial Monitor
The watch does not receive any notifications and also, for some reason the bottom right button on home screen does nothing.
I would appreciate some help
Your current example code uses void loop() and pings the phone every one second which I suppose is for the sake of keeping it simple.
Is there any way that I could get a special message on my esp whenever the phone receives a new notification (and then do a request from the esp using the /notification command) so that I don't have to ping it all the time? This looks incredibly wasteful of energy
I saw that the esp32 wouldn't receive notifications and modified the code a bit: (Just added a couple of Serial.print commands)
void loop()
{
// available commands
// /notifications - gets current android notifications as a string format "appName,Title;ExtraText,ExtraInfoText,ExtraSubText,ExtraTitle;Description;"
// /calendar - returns a string of calender events for the next 24 hours in format "title;description;startDate;startTime;endTime;eventLocation;"
// /time - returns a string representing the time
// /isPlaying - returns "true" or "false" indicating whether spotify is playing on the android device
// /currentSong - returns the current song name and artist playing on spotify as one string
// /play - hits the media play button on the android device
// /pause - hits the media pause button on the android device
// /nextSong - hits the media next song button on the android device
// /lastSong - hits the media previous song button on the android device
String data = "";
/* A bluetooth command can be processed with the below code.
commands can either be blocking or non-blocking (Preventing execution until data is fully recieved)
A string pointer is passed in to the sendBLE function, if an operation is not in progress then the function will return TRUE
and data will be placed in the data string.
sendBLE will return false if a command is currently in progress. */
boolean requestSuccess = sendBLE(
"/notifications", //command
&data, //pointer to string
true //whether the request is blocking or not.
);
/* Certain commands that do not request data, such as the media control commands,
can use the below function
boolean sendBLE(String command)
which will return true if the command was successful and false if not.
*/
if (requestSuccess)
{
Serial.println(data);
ttgo->tft->println(data);
} else {
Serial.println("request failed");
}
delay(5000);
}
I always get the "request failed" message. But the notification posted/removed part works well. By watching debug messages I concluded that it never actually receives any string. From what I saw, the sendBLE function of the current and the previous version are identical so it's a problem in the app, I've done all the settings that I did on the previous app. Plus, inside the app it says:
Device Has Notification Update Service: false
That is likely related but I don't know how the app works
Hi, I am very interested to this project, I managed to install both the app and the firmware, but I can't figure out how to pair my phone (Redmi note 9s) with my t-watch 2020 V3. I even searched for devices without names, I found one that just didn't want to pair with my phone. My phone said "pairing" for a few seconds and then "pairing" just disappered, the device never paired with my phone. Is this unnamed device my t-watch? Is there a chance at least? Does the fact that I have used the t-watch as a bluetooth speaker in the past affect anything?
Hi Bellafaire!
I am facing an issue uploading the sketch to ESP32. When I upload the sketch named "ESP32_BLE_Example_Code_V2" on ESP32 it doesn't show anything on serial monitor and if I upload BLEServer it shows an error in compiling.
So kindly help me and please tell me what should I do.
Thanks
Hi Bellafaire!
Thank you so much for already forking out this project into a separate GitHub repo to make it easier to re-use.
I was wondering if it were possible to add a method for the BLE device to send and receive data to/from a Websocket connection, to allow arbitrary information transfer between a BLE device and a websocket endpoint, preferably in the form of a BLE characteristic (like the old BT SPP channel).
This shouldn't be too hard to add since the app itself should perform little to no intermediate processing apart from stitching packets together from the 8-Byte BLE limit, but I don't know how complex the Java libraries are for this kind of situation.
If this is something you would be willing to add I'd be delighted, otherwise I'd probably nip on this myself eventually and open a PR once I get something working.
I'd want to use this for one of my upcoming projects, the TapV2 badge, to allow continuous communication of my BLE-based wearable with a central server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.