No description
- QML 33.2%
- C++ 32.3%
- Java 31.5%
- CMake 3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Reviewed-on: https://unrealdragon.in/code/code/unrealdragon/WaterLevelSensor/pulls/2 Deleting branch temp main |
||
| android | ||
| .gitignore | ||
| CMakeLists.txt | ||
| configinterface.cpp | ||
| configinterface.h | ||
| images.qrc | ||
| main.cpp | ||
| Main.qml | ||
| moving_container.h | ||
| NotificationManager.java | ||
| README.md | ||
| service.cpp | ||
| service.h | ||
| servicemain.cpp | ||
| udplistener.cpp | ||
| udplistener.h | ||
| WaterTank1.png | ||
Water Level Sensor
Builds using QtCreator, use Qt Version 6.9.
Builds for android and desktop.
On Android Creates a service from service.cpp and android/src/org/qtproject/example/appwaterLevelSensor/WaterLevelService.java.
Changes in AndroidManifest.xml are important.
On Desktop just waits for values from a UDP Broadcast on local network with port 8176 and shows those values.
On Android the service does that, and creates an alert notification if the value in broadcast is less than alert threshold.
Create a new socket in Worker that will instantly start listening.
In the service launch the threads and immediately send client hello to the worker socket.
On client hello send command data to the android service.
On quit send server bye to android service.
On server bye deinit the sockets that send data to cpp server.
On next launch, the command and client threads can be reinitialized from the StartService java class.