This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Initial Setup | |
| 1. Create an X.509 certificate ( You can use tools like https://www.samltool.com/self_signed_certs.php to help you out) | |
| 2. Make sure you save "Private Key"/"X.509 cert" | |
| 3. Upload your X.509 certificate to your Flybits Project through the Signed Login Settings of the Communications tab within your Flybits project (https://devportal.flybits.com) | |
| Login Process (Either device/server side) | |
| 1. Save User object to json file (ex. data.json) | |
| Example | |
| { | |
| "email":"{{email@flybits.com}}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FlybitsOptions options = new FlybitsOptions.Builder(MainActivity.this) | |
| //Other possible Flybits Options | |
| .enableContextUploading(1, ContextPriority.HIGH) //1 indicates the time in minutes to upload context | |
| .build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FlybitsContextPlugin pluginBeacon = new FlybitsContextPlugin.Builder() | |
| .setPluginIdentifier(AvailablePlugins.BEACON) | |
| .setRefreshTime(60, 30, TimeUnit.SECONDS) //60 = refresh Time, 30 = flexible refresh rate | |
| .build(); | |
| ContextManager.include(context).register(pluginBeacon); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="{yourPackageName}"> | |
| ... | |
| <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- BEACON CONTEXT PERMISSION --> | |
| <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- BEACON CONTEXT PERMISSION --> | |
| <permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- BEACON CONTEXT PERMISSION --> | |
| <permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- BEACON CONTEXT PERMISSION --> | |
| <uses-permission android:name="android.permission.BLUETOOTH"/> <!-- BEACON CONTEXT PERMISSION --> | |
| <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <!-- BEACON CONTEXT PERMISSION --> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Subscribing to push notifications via a model object | |
| Zone *myZone = <Zone received from an API request> | |
| [myZone subscribeToPush]; | |
| // 2. Subscribing to push notifications via the PushManager | |
| [[PushManager sharedManager] subscribeToTopic:@"zone/16667180-2BC0-4F8C-B31F-BD3C4FD6629E"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Connect to a Zone ... | |
| Zone *myZone = <Zone received from an API request> | |
| DeviceQuery *query = [DeviceQuery queryForZone:myZone.identifier]; | |
| // ... or connect to a Moment | |
| Moment *myMoment = <Moment received from an API request> | |
| DeviceQuery *query = [DeviceQuery queryForMoment:myMoment.identifier]; | |
| [APIManager deviceDisconnect:query withCompletion:^(NSError * _Nullable error){ | |
| if (error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Connect to a Zone ... | |
| let myZone = <Zone received from an API request> | |
| let query = DeviceQuery(.Zone, id: myZone.id) | |
| // ... or connect to a Moment | |
| let myMoment = <Moment received from an API request> | |
| let query = DeviceQuery(.Moment, id: myMoment.id) | |
| DeviceRequest.Disconnect(query) { (error) in | |
| guard error == nil else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Connect to a Zone ... | |
| Zone *myZone = <Zone received from an API request> | |
| DeviceQuery *query = [DeviceQuery queryForZone:myZone.identifier]; | |
| // ... or connect to a Moment | |
| Moment *myMoment = <Moment received from an API request> | |
| DeviceQuery *query = [DeviceQuery queryForMoment:myMoment.identifier]; | |
| [APIManager deviceConnect:query withCompletion:^(NSError * _Nullable error){ | |
| if (error) { |
NewerOlder