I have a Node JS web application that runs on a Raspberry Pi. It controls a burgular alarm so that you can remotely set/unset the alarm. I have never used Node JS before hence I really want to avoid having to change it.
我有一个在树莓PI上运行的Node JS Web应用程序。它可以控制防盗闹钟,这样您就可以远程设置/取消设置闹钟。我以前从未使用过Node JS,因此我真的想避免更改它。
I know the web page interface part uses web sockets to communicate with the Node JS backend.
Am I correct in saying I should be able to write a native Android app to communicate with the Node JS backend without having to change anything in the Node JS backend?
我知道网页界面部分使用Web套接字与Node JS后端进行通信。我应该能够编写一个原生Android应用程序来与Node JS后端通信,而不必在Node JS后端中进行任何更改,这样说对吗?
After some research, I have found out developing a web view app is easier. However I would like the application to be running in the background. It will monitor the messages coming from the Node JS backend and soon as the backend detects the alarm has been triggered it will play a siren like sound. Would I need to develop a native android app for such functionality?
经过一些研究,我发现开发一个网络浏览应用程序更容易。但是,我希望应用程序在后台运行。它会监控来自Node JS后台的消息,后台一旦检测到警报被触发,就会发出类似警报声的声音。我需要为这样的功能开发一个原生的Android应用程序吗?
Here is the link to the source code am using:
https://github.com/lpaolini/AccentaG4/tree/master/src/mpu
以下是我使用的源代码的链接:https://github.com/lpaolini/AccentaG4/tree/master/src/mpu
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!