
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
cordova-plugin-flic-lib
Advanced tools
A Cordova plugin providing access to the Flic SDK (Android and iOS)
$ cordova plugin add cordova-plugin-flic-lib --variable URL_SCHEME=flic20
Set android:minSdkVersion="19"
or higher in config.xml for the Android
<preference name="android-minSdkVersion" value="19" />
$ cordova build android
Set deployment-target=8.0
or higher in config.xml for the iOS
<preference name="deployment-target" value="8.0" />
Make sure, that you have installed node-xcode version 0.8.7 or higher on your Mac
$ npm i xcode
$ cordova build ios
It has been currently stripped to the minimum needed from a Javascript app.
The following functions are available:
function successInit(result) {
console.log('Flic init succeeded');
// Get known buttons
Flic.getKnownButtons(
function(buttons) {
console.log('Flic getKnownButtons succeeded');
console.log('Flic known buttons: ' + JSON.stringify(buttons));
},
function(message) {
console.log('Flic getKnownButtons failed: ' + message);
});
}
function errorInit(message) {
console.log('Flic init failed: ' + message);
}
function onFlicButtonPressed(result) {
console.log(result.event); // (String) singleClick or doubleClick or hold
console.log(result.button.buttonId); // (String)
console.log(result.button.color); // (String) green
console.log(result.wasQueued); // (Boolean) If the event was locally queued in the button because it was disconnected. After the connection is completed, the event will be sent with this parameter set to true.
console.log(result.timeDiff); // (Number) If the event was queued, the timeDiff will be the number of seconds since the event happened.
}
function onFlicButtonPressedError(err){
console.log(err);
}
var config: Config = {
appId: 'your app id',
appSecret: 'your app client secret',
appName: 'your app name',
reloadOnFlicEvent: true,
}
// Init flic
Flic.init(config, successInit, errorInit);
// Subscription to button events
Flic.onButtonClick(onFlicButtonPressed, onFlicButtonPressedError)
FAQs
A Cordova plugin providing access to the Flic SDK
The npm package cordova-plugin-flic-lib receives a total of 1 weekly downloads. As such, cordova-plugin-flic-lib popularity was classified as not popular.
We found that cordova-plugin-flic-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.