BLE外围设备可以连接到Android手机上的后台应用吗?(Can a BLE peripheral connect to a background app on an Android phone?)
我正在开发一个应用程序,我们将有一个带按钮的BLE外围设备和一个在Android手机上运行的应用程序。 用户将手动将外围设备与电话配对,然后电话可以进入待机状态,或用于其他目的。
按下BLE外围设备上的按钮会导致手机唤醒并打开应用程序吗?
在相关说明中,如果手机重新通电,是否可以将其配置为自动与外围设备重新配对,而无需任何用户操作?
如果外围设备重新启动,它是否可以自动与手机重新配对,而无需任何用户操作?
I am working on an application where we will have a BLE peripheral with a button, and an App running on an Android phone. The user will manually pair the peripheral with the phone, and then the phone may go into standby, or be used for other purposes.
Can a button press on the BLE peripheral cause the phone to wakeup and open the App?
On a related note, if the phone is power cycled, can it be configured to automatically re-pair with the peripheral, without requiring any user action?
If the peripheral is power cycled, can it automatically re-pair with the phone, without requiring any user action?
原文:https://stackoverflow.com/questions/25417134
最满意答案
如果主机应用程序具有正确的访问权限,那么您可以解决方法并使用进程调用到.NET控制台命令:
ProcessStartInfo processInfo = new ProcessStartInfo("NET", "start ExecuterService"); Process process = Process.Start(processInfo); p.WaitForExit();
但它很难看。
If the host application have correct access rights, then you could workaround and use process call to NET console comands:
ProcessStartInfo processInfo = new ProcessStartInfo("NET", "start ExecuterService"); Process process = Process.Start(processInfo); p.WaitForExit();
But it is ugly.
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
停止/启动远程Windows服务并等待它打开/关闭(Stopping/Starting a remote Windows service and waiting for it to open/close)[2022-04-15]
我创建了一组使用sc.exe执行此操作的批处理脚本。 他们在下面。 要运行这些脚本, 您应该是在目标计算机上具有管理权限的用户,并从作为同一域的成员的计算机运行这些脚本。 可以将其设置为能够从域外运行(例如从VPN),但通过涉及防火墙,DCOM和安全凭证,可以通过很多层次的安全性来实现。 其中有一天,我将会找出PowerShell的等效项,这应该更容易一些。 safeServiceStart.bat @echo off :: This script originally authored by Eric F ... -
是的,它可以。 如果您的VM的操作系统支持适当的文件系统,并且有容器。 我建议你按照https://www.docker.io/gettingstarted/的建议去使用最新的Ubuntu版本,因为这已知可行。 Yes, it can. If your VM's operating system supports the appropriate filesystems, and have containers. I suggest you go though as suggested on https:// ...
-
我的问题的答案就在这里。 我需要将以下内容添加到我的Elasticsearch配置文件中 network.host: [_local_, _site_] 这就像一个魅力。 自2.xx版本以来,这已在ElasticSearch中添加。 谢谢 The answer to my question is here. I needed to add the following to my Elasticsearch config file network.host: [_local_, _site_] This ...
-
如果主机应用程序具有正确的访问权限,那么您可以解决方法并使用进程调用到.NET控制台命令: ProcessStartInfo processInfo = new ProcessStartInfo("NET", "start ExecuterService"); Process process = Process.Start(processInfo); p.WaitForExit(); 但它很难看。 If the host application have correct access rights, th ...
-
运行它: rails server thin -d 即使你退出也应该留在后台。 Run it with: rails server thin -d And it should stay in background even when you log out.
-
我通过以编程方式启动远程注册表服务解决了该问题。 ServiceController remoteRegistryController = new ServiceController("REMOTEREGISTRY", "MachineName"); remoteRegistryController.Start(); I have solved the problem by programmatically starting the remote registry service. ...
-
共享Azure虚拟机(Share Azure Virtual Machine)[2023-11-29]
是。 您可以使用Windows Server中的用户和组对话框创建多个用户,然后为这些用户提供远程桌面访问权限。 这不是特定于Azure,但它只是Windows Server的功能。 请参阅: https : //technet.microsoft.com/en-us/library/cc732336.aspx Yes. You can just use the users and groups dialog in Windows Server to create multiple users, and t ... -
通过C#代码启动和停止远程计算机上的IIS [关闭](Start and Stop IIS on remote machine through C# code [closed])[2022-02-03]
Microsoft.Web.Administration命名空间具有管理IIS所需的功能。 请查看: http : //msdn.microsoft.com/en-us/library/microsoft.web.administration%28VS.90%29.aspx 。 但是,如果您只想停止并启动服务,则可以使用Service.Controller管理服务 ServiceController service = new ServiceController(serviceName); TimeSp ...