[英]In xamarin.ios bluetooth-central not act as it should
I have xamarin forms application which uses BLE peripheral device to update database. 我有xamarin表单应用程序,它使用BLE外围设备更新数据库。 I do not want to interrupt this process when entering into background. 我不想在进入后台时中断此过程。 For that purpose i included in info.plist on iOS project this: 为此,我在iOS项目中包含了info.plist:
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
</array>
which done nothing. 什么也没做。 I changed side 2 times in foreground, 5 times in background and 2 times in foreground again and i have that log: 我在前景中改变了2次,在背景中改变了5次,在前景中改变了2次,我有了这个日志:
3/16/2017 10:27:30 AM breadcrumb: Sucessfully started
3/16/2017 10:27:30 AM breadcrumb: Navigated to MainPage
3/16/2017 10:27:31 AM breadcrumb: Activated
3/16/2017 10:27:31 AM breadcrumb: StatisticsPage appeared
3/16/2017 10:27:50 AM breadcrumb: SideChanged
3/16/2017 10:28:42 AM breadcrumb: SideChanged
3/16/2017 10:28:45 AM breadcrumb: Enter background
3/16/2017 10:28:58 AM breadcrumb: EnterForeground
3/16/2017 10:28:59 AM breadcrumb: Activated
3/16/2017 10:29:04 AM breadcrumb: SideChanged
3/16/2017 10:29:08 AM breadcrumb: SideChanged
no side changes in background. 背景没有变化。 What I forgot to do and where I should search? 我忘了做什么,在哪里搜索?
Edit1: I made a sample app on xamarin.iOS and everything works fine. 编辑1:我在xamarin.iOS上制作了一个示例应用程序,一切正常。 Looks like there is something in my code. 看起来我的代码中有一些东西。 But i will appreciate any help with this. 但我会感谢任何帮助。
Edit2: I removed all code from my project until nothing left and it's still does not work! Edit2:我从我的项目中删除了所有代码,直到什么都没有,它仍然无效! my broken app sample working app 我破碎的应用 示例工作应用
请在info.plist条目中尝试使用bluetooth-peripheral
作为您的值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.