6

Is there any way to use Google Nearby Messages API to publish messages while the iOS application is in the background?

According to the Nearby Messages API documentation:

The publication is active as long as the publication object exists. To stop publishing, release the publication object.

I do not release the publication object but the app seems to stop publishing messages when it goes in the background (despite I have turned BLE and Audio background modes on).

Aris Goudouras
  • 325
  • 2
  • 7
  • It isn't enough to simply declare background modes - you need to *do* something in the background - For example, in the case of audio you need to play 'silence' – Paulw11 Sep 02 '15 at 07:52
  • Yes, this is right, but isn't Google Nearby Messages supposed to continue publishing messages as long as the publication object exists in memory? If not, what message should I send in order to be properly received by nearby devices that have subscribed to receive messages through Google Nearby Messages API? – Aris Goudouras Sep 02 '15 at 11:26

1 Answers1

4

Sorry, background operation is not yet supported by Nearby Messages on iOS. Currently it can only be in use by the foreground app.

Update: Nearby Messages on iOS now supports background mode for publications, subscriptions, and beacon scanning. See the Nearby Messages Developer Site and the CocoaPod for details.

Dan Webb
  • 348
  • 1
  • 7
  • Eddystone beacons could be discovered in the background using Core Bluetooth as described [here](https://forums.estimote.com/t/is-eddystone-for-ios-capable-of-monitoring-or-scanning-running-in-background/1587). However, it might come with a couple of limitations and generally speaking it doesn't work as well as it does with iBeacons (e.g. the detection of beacons can take much longer using Core Bluetooth instead of Core Location). – m_____z May 05 '16 at 08:51