Maz,
Have you actually dug into the Android SDK that is linked from the page you linked to? Read this:
Why do I need the Flic app? The fliclib works with the Flic app so that you don't have to worry about handling the Flics, scanning the Flics, or monitoring the communication with them. All of that is taken care of by the Flic app.
That means you have to track when the down is pressed, and then up, and then see if another down/up is triggered within a certain time interval. So no, I can't just add MobileSheetsPro support for the Flic button without having to change code as I described to you in our email conversation. I'll post that again here:
Also take a look at this: https://partners.flic.io/partners/develo...w-it-works
You, as the developer, have to specify what actions are supported through the Flic button. This is done through code changes and as part of the registration (I assume).
Mike
Have you actually dug into the Android SDK that is linked from the page you linked to? Read this:
Why do I need the Flic app? The fliclib works with the Flic app so that you don't have to worry about handling the Flics, scanning the Flics, or monitoring the communication with them. All of that is taken care of by the Flic app.
- Download and install the Flic app. It's free and you can find it in the Google Play Store.
- Connect all your Flics to the app.
- That's it! Now you will be able to use the Flic Grabber and get access to the Flics inside your own app. Don't worry, we'll go through how this is done soon.
Code:
@Override
public void onButtonUpOrDown(Context context, FlicButton button, boolean wasQueued, int timeDiff, boolean isUp, boolean isDown) {
if (isUp) {
// Code for button up event here
} else {
// Code for button down event here
}
}
That means you have to track when the down is pressed, and then up, and then see if another down/up is triggered within a certain time interval. So no, I can't just add MobileSheetsPro support for the Flic button without having to change code as I described to you in our email conversation. I'll post that again here:
Quote:That isn't the whole picture though. What is missing are things that would need to be done such as:
1) Building the UI components to initiate the connection with the Flic button and allow the user to pick which flic button they are communicating with. If I need to support connections to multiple buttons at once, this would require more work in terms of managing multiple connections and letting the user map each button to different actions.
2) Either modifying the existing pedal actions settings screen to allow the flic button to be used for that, or creating an entirely new settings screen to allow the flic buttons to be mapped to actions (the latter makes more sense). What may be necessary is a dropdown or toggle on the pedal settings screen that lets the user choose whether they are using a standard bluetooth pedal or a flic button. If multiple flic buttons are supported, another dropdown needs to be listed to determine which button is mapped to which actions. This also facilitates the need to save this information in a new format somewhere.
3) Code to automatically reconnect to buttons (if possible) so the user doesn't always have to manually initiate the connection to the buttons every time they start MobileSheetsPro.
4) I need to actually get flic buttons to test with and sign up with flic to one of their allowed "friends"
It looks like flic only supports Android and iOS, which will probably be a disappointment to Windows 10 users, but there isn't much I can do about that. As you can see, adding support for the flic buttons is not a simple task that will take 30 minutes. It's going to take a fair number of hours for all of the development and testing.
Also take a look at this: https://partners.flic.io/partners/develo...w-it-works
You, as the developer, have to specify what actions are supported through the Flic button. This is done through code changes and as part of the registration (I assume).
Mike