PhoneGap automatic Native Alert Plugin for android
by Arjun T Raj DESCRIPTION
This plugin provides a simple way to use the normal javascript alert it automaticaly convert to Native android alert, It does comply with the latest phonegap standards.
Compared to the phonegaps navigator.notification.alert if anyone (new to phonegap ) forget to change normal alert('') it will give a big problem. so here You can fell free to use normal alert. or MY native alert.
SETUP
Using this plugin requires android PhoneGap.
<plugin name="msgbox" value="com.company.msgbox.msgbox"/>
add this to your plugin.xml Add the .js files to your www folder on disk, and add reference(s) to the .js files as tags in your html file(s) Add
<script>(function(window){window.alert=function(text,opo){ navigator.nativeAlert.show(text);};}(window));</script>this to the head of your html pages
JAVASCRIPT INTERFACE
// Basic with title navigator.nativeAlert.show('Your message');
// Complex feel free to """""""use Normal alert('hello world');"""""""""""""" this script automayicaly convert it to native alert Check source for additional configuration.
BUGS AND CONTRIBUTIONS
phpmyweb.
The latest code (my fork) will always be here LICENSE
Copyright 2012 Arjun T Raj. All rights reserved.
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CREDITS