<commit_before># Cordova-Flic
A Cordova plugin providing access to the Flic SDK

## Installation
    $ cordova plugin add cordova-plugin-flic  --variable URL_SCHEME=mycoolapp

Set android:minSdkVersion="19" or higher in AndroidManifest.xml

Set deployment-target = 8.0 or higher for the iOS 
	<preference name="deployment-target" value="8.0" />


    $ cordova build android
	$ cordova build android

## Plugin API
It has been currently stripped to the minimum needed from a Javascript app.

The following functions are available:

* Flic.init (config, , success, error). Initialize Flic and register known buttons for receiving single click, double click and hold events
  * config:
	* appId: your app client ID
	* appSecret: your app client secret
	* appName: your app name
	* reloadOnFlicEvent: in case you want to start the App via Flic event (Android only, Boolean, default: false)
  * success: called on function success
  * error: called on function error
* Flic.getKnownButtons(options). Get known buttons. Returns the list of buttons grabbed in a previous run of the app
  * success: called on function success
  * error: called on function error
* Flic.grabButton(options). Grab a button and register it for receiving single click, double click and hold events. Returns the grabbed button
  * success: called on function success
  * error: called on function error

## Sample usage code
    // Init flic
    Flic.init({
			appId: 'your app id'
			appSecret: 'your app client secret' 
			appName: 'your app name'
			reloadOnFlicEvent: true<commit_msg>Typo in the readme file<commit_after># Cordova-Flic
A Cordova plugin providing access to the Flic SDK

## Installation
    $ cordova plugin add cordova-plugin-flic  --variable URL_SCHEME=mycoolapp

Set android:minSdkVersion="19" or higher in AndroidManifest.xml for the Android

    $ cordova build android

Set deployment-target = 8.0 or higher for the iOS 
```xml
	<preference name="deployment-target" value="8.0" />
```

	$ cordova build ios

## Plugin API
It has been currently stripped to the minimum needed from a Javascript app.

The following functions are available:

* Flic.init (config, , success, error). Initialize Flic and register known buttons for receiving single click, double click and hold events
  * config:
	* appId: your app client ID
	* appSecret: your app client secret
	* appName: your app name
	* reloadOnFlicEvent: in case you want to start the App via Flic event (Android only, Boolean, default: false)
  * success: called on function success
  * error: called on function error
* Flic.getKnownButtons(options). Get known buttons. Returns the list of buttons grabbed in a previous run of the app
  * success: called on function success
  * error: called on function error
* Flic.grabButton(options). Grab a button and register it for receiving single click, double click and hold events. Returns the grabbed button
  * success: called on function success
  * error: called on function error

## Sample usage code
    // Init flic
    Flic.init({
			appId: 'your app id'
			appSecret: 'your app client secret' 
			appName: 'your app name'
			reloadOnFlicEvent: true
{'fraction_non_alphanumeric': 0.06787186806216301, 'fraction_numerical': 0.003805899143672693, 'mean_word_length': 4.070739549839228, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1105284', 'n_tokens_mistral': 904, 'n_tokens_neox': 864, 'n_words': 407}