Known Issues
- This plugin is not yet plugman compatible. I will work on that in a future version.
- More complete documentation and readme, as well as a sample project will be included when the project is production ready.
- Add the AirFlingerPlugin.h and AirFlingerPlugin.m files to your "Plugins" folder in your PhoneGap project
- Add the AirFlingerPlugin.js files to your "www" folder on disk, and add a reference to the .js file after cordova.js.
- Add the AirFlinger library to your Xcode project.
- Add to config.xml under plugins:
<plugin name="AirFlingerPlugin" value="AirFlingerPlugin" />
or, if using the new format,<feature name="AirFlingerPlugin"> <param name="ios-package" value="AirFlingerPlugin" /> </feature>
- On android, in the value attribute be sure to include the package name as well, for example
value="org.apache.cordova.AirFlingerPlugin"
- Use the
window.plugins.airflinger.initializeAF(success, failure)
to start Airflinger. - If successful, call
window.plugins.airflinger.getDeviceList(success, failure)
- The success callback will have a parameter in the form of a JSON object.
- Use methods like getVolume and setVolume to adjust the volume of the device.