<commit_before># NowPlaying #

The [BlackBerry 10 Cordova Plugin] (https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB11-Cordova/NowPlaying) plays music in the background. 
This is a sample app that uses the plugin.

## Applies To ##

* [BlackBerry 10 WebWorks SDK](https://developer.blackberry.com/html5/download/sdk)

## Author(s) ##

* [<NAME>] (https://github.com/timwindsor)
* [<NAME>] (https://github.com/parker-mar)
* [<NAME>] (https://github.com/Makoz)

## Building and running the sample app

In the console, run:

1. rm -rf debug1
2. cordova create debug1
3. cd debug1
4. cordova plugin add https://github.com/blackberry/WebWorks-Community-APIs.git#:/BB10-Cordova/NowPlaying/plugin
   (or if that does not work because the below isn't pulled to that link yet, run the below instead)
cordova plugin add https://github.com/parker-mar/BB10-WebWorks-Community-Samples.git#:/BB10-Cordova/NowPlaying/plugin
5. rm -rf www/
6. cp ../config.xml ./
7. cp -r ../www/ ./www
8. cordova platform add blackberry10
9. (Instructions:) Import the native extension project into Momentics, with root directory as `/plugins/com.blackberry.community.nowplaying/src/blackberry10/native`.
In the Momentics IDE, right click the project: under "Build Configurations", select "Clean All" then "Build All". (This should build cleanly with potentially only warnings).
10. cordova run

The app should now be running.

## Javascript API ##

### Object Methods ###

#### NowPlayingRequestPlayback() ####
Sets up the app for playing music and binds callbacks to the app.<commit_msg>modified readme<commit_after># NowPlaying #

The [BlackBerry 10 Cordova Plugin] (https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB11-Cordova/NowPlaying) plays music in the background. 
This is a sample app that uses the plugin.

## Applies To ##

* [BlackBerry 10 WebWorks SDK](https://developer.blackberry.com/html5/download/sdk)

## Author(s) ##

* [<NAME>] (https://github.com/timwindsor)
* [<NAME>] (https://github.com/parker-mar)
* [<NAME>] (https://github.com/Makoz)

## Building and running the sample app

In the console, run:

1. rm -rf debug1
2. cordova create debug1
3. cd debug1
4. cordova plugin add https://github.com/blackberry/WebWorks-Community-APIs.git#:/BB10-Cordova/NowPlaying/plugin
   (or if that does not work because the below isn't pulled to that link yet, run the below instead)
cordova plugin add https://github.com/parker-mar/WebWorks-Community-APIs.git#:/BB10-Cordova/NowPlaying/plugin
5. rm -rf www/
6. cp ../config.xml ./
7. cp -r ../www/ ./www
8. cordova platform add blackberry10
9. (Instructions:) Import the native extension project into Momentics, with root directory as `/plugins/com.blackberry.community.nowplaying/src/blackberry10/native`.
In the Momentics IDE, right click the project: under "Build Configurations", select "Clean All" then "Build All". (This should build cleanly with potentially only warnings).
10. cordova run

The app should now be running.

## Javascript API ##

### Object Methods ###

#### NowPlayingRequestPlayback() ####
Sets up the app for playing music and binds callbacks to the app.
{'fraction_non_alphanumeric': 0.12682771773680865, 'fraction_numerical': 0.019071837253655435, 'mean_word_length': 4.271356783919598, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 14, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7445368', 'n_tokens_mistral': 1058, 'n_tokens_neox': 963, 'n_words': 334}