Cordova:在后台模式下扫描iBeacons/BLE(iOS和Android) [英] Cordova: Scan for iBeacons / BLE in background mode (iOS and Android)

查看:153
本文介绍了Cordova:在后台模式下扫描iBeacons/BLE(iOS和Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了cordova/ionic应用程序(适用于iOS/Android的混合应用程序),该应用程序在后台模式下扫描iBeacon并通知用户(如果找到了信标).我正在使用以下插件:

I have implemented an cordova/ionic app (hybrid for iOS/Android) that scans for iBeacons in background mode and notifies the user, if a beacon is found. I am using following plugins:

  • iBeacon扫描:petermetz的 cordova-plugin-ibeacon
  • 背景模式: cordova-plugin-background-mode ,由katzer
  • 通知:katzer的 cordova-plugin-local-notifications
  • iBeacon Scanning: cordova-plugin-ibeacon by petermetz
  • Background Mode: cordova-plugin-background-mode by katzer
  • Notification: cordova-plugin-local-notifications by katzer

到目前为止(在iOS和Android上),效果都不错.这里的问题是,苹果公司会拒绝将我的App表单发布到App Store(请参阅

This works good so far (on both iOS and Android). The problem here is, that Apple would reject my App form publishing to the App Store (see https://github.com/katzer/cordova-plugin-background-mode/issues/77). An other problem is, that it seems like the background beacon scanning is consuming very much battery capacity. With this Background Plugin the complete App is running in the background and not just a specific function/service.

您是否知道有没有在后台运行任务的插件(或更具体的说:在后台扫描iBeacons),该插件可在iOS和Android上运行,并且会被App Store接受?我还没找到如果没有这样的插件,您认为通常可以开发这样的插件吗?据我所知,Android和iOS(本机)都可以使用后台服务.

Does anyone of you know if there is a plugin for running tasks in background (or more specific: scanning for iBeacons in background), which works on iOS and Android and would be accepted by the App Stores? I haven't found any. If such a plugin is not available, do you think it would generally be possible to develop such a plugin? As far as I know, background services are available for both Android and iOS (native).

谢谢!

推荐答案

我也面临着同样的问题.我不是本机应用程序开发人员,但我知道将所有这三个插件结合使用将获得理想的结果

I'm facing the same issue also.I'm not a native app developer but i came to know that combining all this three plugins you will get desired result.

我的概念是在应用程序后台模式下将信标从该区域移开时通知移动设备.

My concept is to notify mobile when beacon moves from the region in application background mode.

-Naitik

这篇关于Cordova:在后台模式下扫描iBeacons/BLE(iOS和Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆