# StatusBarNotification plugin for Phonegap #
Plugin allows you to display notifications in the status bar from your PhoneGap application.
## Adding the Plugin to your project ##
Using this plugin requires [Android PhoneGap](http://github.com/phonegap/phonegap-android).
1. To install the plugin, move statusbarnotification.js to your project's www folder and include a reference to it in your html file after phonegap.js.
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8" src="statusbarnotification.js"></script>
2. Create a directory within your project called "src/com/phonegap/plugins/statusBarNotification" and move StatusBarNotification.java into it.
3. Add the following activity to your AndroidManifest.xml file. It should be added inside the <application> tag.
<activity android:name="com.phonegap.DroidGap" android:label="@string/app_name">
<intent-filter>
</intent-filter>
</activity>
4. In your res/xml/plugins.xml file add the following line:
<plugin name="StatusBarNotification" value="com.phonegap.plugins.statusBarNotification.StatusBarNotification"/>
5. You will need to add a nofication.png file to you applications res/drawable-ldpi, res/drawable-mdpi & res/drawable-hdpi directories.
6. You will need to add an import line like:
import com.my.app.R;
Where com.my.app is your applications package name in order for this to compile.
## Using the plugin ##
The plugin creates the object `window.plugins.statusBarNotification`. To use, call one of the following, available methods:
/** * Displays new status bar notification * * @param notificationTitle The url to load * @param notificationBody Load url in PhoneGap webview [optional] - Default: false */ notify(notificationTitle, notificationBody);Sample use: window.plugins.statusBarNotification.notify("Put your title here", "Put your message here"); ## License ## Copyright (C) 2011 Dmitry Savchenko