Home / Companies / PubNub / Blog / Post Details
Content Deep Dive

How to Build an Android Beacon (iBeacon) Emitter [3/3]

Blog post from PubNub

Post Details
Company
Date Published
Author
Michael Carroll
Word Count
1,362
Language
English
Hacker News Points
-
Summary

In the final part of a series on building an Android beacon, the article focuses on transforming an Android device, specifically those running Android L like Nexus 6 and Nexus 9, into a beacon emitter. It describes the technical steps to set up Bluetooth Low Energy (BLE) advertising, including configuring AdvertiseData and AdvertiseSettings, and the creation of a byte array to store beacon identifiers and transmission power. The article also details the integration of PubNub to enable two-way communication, allowing the beacon to interact with devices detecting its signal by subscribing to a PubNub channel and triggering messages upon connection. Additionally, it provides guidance on acquiring necessary PubNub keys and implementing callbacks for various events, emphasizing the potential for smarter beacon applications by leveraging this technology.