We are opening up a new bounty for someone who can write a Mobile SDK for us. There will be two bounties of equal value, one for the Android side and one for the iOS side (so one person could technically win both, or two people can win them separately).
The main goal is to put together a library that people can quickly import into their apps so they can interact with bluz. The SDK should be added easily through normal package manager best practices for each platform (Gradle for Android, Cocoapods for iOS but also open to using Carthage).
The SDK should handle all of the lower layer interactions with bluz, eliminating any users need to call respective BLE functions on the platform. Instead, these basic calls should be available:
- StartScanForDevices: Takes in a time period to scan for and a callback function. A BluzDevice object should be handed to the callback every time one is discovered
- StopScanForDevices: Stops any currently running scan
- SetStateCallback: Takes in a callback function that will be called whenever the state changes on a BluzDevice object. So whenever a device connects/disconnects, the callback function should be called with eh BluzDevice object and the new state
- SetDataCallback: Takes in a callback function that will be called whenever data arrives from a connected Bluz DK device. The callback function should take a BluzDevice object and the data as a byte array
- Connect: Takes in a BluzDevice object that was handed back from the scan call and connects to it. Should also take an optional boolean argument specifying if the device should be connected to the cloud or not
- Disconnect: Takes in a BluzDevice object and disconnects it from the phone
- SendData: Sends data to a connected bluz DK. Takes a BluzDevice object and a byte array to send
- GetDeviceID: Gets the Particle device ID of a connected bluz DK, takes in a BluzDevice object
The exact naming and syntax of functions above should be coordinated through the bluz team so that we don’t have wildly different syntax between the two platforms. They should be the same basic syntax/framework on iOS and Android. We will coordinate with the people who decide to try so that things are consistent. Callback functionality can be handled appropriately on each platform by using subclasses.
The SDK should handle all cloud connections in the background. So when Connect is called, it will allow bluz to request opening a socket to the Paricle cloud and will handle all communications between Particle and bluz seamlessly.
Language of the SDK is up to you somewhat. Android should be Java, iOS can be Objective-C or Swift.
Deliverables need to be full source code published online along with instructions for installation and use. Installation into any new project should be done through a package manager as noted above. We will test your SDK by creating samples apps on the specified platform and making sure all functions work.
You can of course use our open source apps as a good starting point, they already do all of the above functionality. You basically are creating a wrapper around it and getting it integrated with the package manager.
Prizes! The prize for each will be a $150 gift card to be used on our store, which can be used for any items we have available. Again, each bounty gets this, so if one person does both, you would get a $300 gift card!
If you are going to attempt this task, please respond here so people know and we don’t have super duplication. Plus, we want to coordinate with you, so please let us know!