Wednesday, 6 March 2013

DeviceManager application

Recently I've been working with both InputStick prototypes, what forced me to constantly change MAC address in my development/demo apps, what became really annoying. The same situation will occur when someone has more than one InputStick device, for example: one at his office, few more at home (for PC, laptop, game console). Of course you could use just one, but in such case you have to remember to remove it and carry with you. I've decided that it is necessary to add support for more than one InputStick device. I came up with an idea of InputStick DeviceManager application, which will allow user to easily manage InputStick devices and choose a device which he wants to use at a given time. Introducing DeviceManager app will also reduce code/time necessary to add support for InputStick in an Android application: now its enough to call DeviceManager via intent to get MAC address of device which user wants to use. So let's take a look at how DeviceManager looks and what functionality it offers:

DevicesList: list of all associated InputStick devices.
DeviceProperties: this activity allows to edit basic device properties: name and type. Possible types are: Home, Office, Travel, Other. This allows to associate given device with its most common use case.
DeviceDetails: displays detailed device information (firmware version etc).
FirmwareUpgrade: allows to flash firmware via Bluetooth, there is no need to disassemble device and connect debugger interface. Really important feature, since now when new firmware is released anyone is able to flash it.
AddDevice: here we can add new InputStick device. In order to do that we need to know its MAC address. There are three possible ways to enter it: scan QR code, use Bluetooth discovery or just manually type it. When correct MAC address is entered application can move on to the next step.
Verification: in this step DeviceManager attempts to connect to given MAC address and confirm that it is in fact compatible InputStick device. If everything goes OK, device is added and we are asked if we want to edit its properties.
Settings: here we can choose if we want to be notified everytime some application receives MAC address. We can also specify under what conditions we will be asked to manually select InputStick device. There are three possibilities: 1) Always - dialog will be displayed everytime, even if there is only one InputStick available (this way we are always aware of the fact that some application attempts connection). 2) Only if necessary - dialog will be displayed only if there is more than one InputStick device associated. If there is only one, user will not be bothered. 3) Never - if there is more than one device then the default one will be used (device can be marked as the default device). This is intended for cases when there are several devices associated, but only one of them is used 99.9% of time and we find dialog annoying.
Dialog: When some application wants to get MAC address of InputStick device, we will see following dialog: which will allow us to select desired device (of course depending on settings we may not see this dialog at all).

No comments:

Post a Comment