This application scans for nearby bluetooth low energy beacons. It was built using ionic cross-platform framework. The implementation has been tested on both android & iOS devices.
Android | iOS |
---|---|
-
Clone / download the repo
-
Run
npm install
-
Build & deploy to Android
- Prerequisites
- Java JDK 8
- Android Studio
- Run the following CLI commands
ionic build
ionic cordova platform add android
ionic cordova run android
#To run on an android studio emulatorionic cordova run android --device
#To run on a device
- Prerequisites
-
Build & deploy to iOS:
- Prerequisites
- macOS
- Xcode, install it from the App Store
- iOS Developer account, sign up on developer.apple.com, it's free
- Run the following CLI command
ionic cordova build ios --prod
- Prerequisites
In the project, I'm using estimote beacon with UUID
= b9407f30-f5f8-466e-aff9-25556b57fe6d
. In case you are using another company's product, just modify the UUID in path src/app/home/home.page.ts
uuid = <Beacon UUID>;
If all goes well it will start scanning for nearby beacons after pressing play button, but if you run into:
Cannot read property 'locationManager' of undefined
This is due to instability of the iBeacon plugin. To overcome the issue, replace some files with the ones you have in the project, see here.
MIT