diff --git a/.gitignore b/.gitignore index 37026cc7..5c53ca30 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ gen assets/www/phonegap.js local.properties framework/phonegap.jar -framework/bin \ No newline at end of file +framework/bin +framework/assets/www/.DS_Store diff --git a/framework/assets/www/phonegap.js b/framework/assets/www/phonegap.js index 8aa92570..047de7c4 100644 --- a/framework/assets/www/phonegap.js +++ b/framework/assets/www/phonegap.js @@ -2073,8 +2073,9 @@ function Notification() { * @param {String} [buttonLabel="OK"] Label of the close button (default: OK) */ Notification.prototype.alert = function(message, title, buttonLabel) { - // Default is to use a browser alert; this will use "index.html" as the title though - alert(message); + var _title = (title || "Alert"); + var _buttonLabel = (buttonLabel || "OK"); + PhoneGap.execAsync(null, null, "Notification", "alert", [message,_title,_buttonLabel]); }; /** diff --git a/lib/create.rb b/lib/create.rb index cabb7082..00b793c6 100644 --- a/lib/create.rb +++ b/lib/create.rb @@ -21,7 +21,7 @@ class Create < Classic @path = File.join(path, '..', "#{ @name }_android") @www = path @pkg = "com.phonegap.#{ @name }" - @android_sdk_path = Dir.getwd[0,1] != "/" ? `android-sdk-path.bat android.bat`.gsub('\\tools','').gsub('\\', '\\\\\\\\') : `which android`.gsub('/tools/android','') + @android_sdk_path = Dir.getwd[0,1] != "/" ? `android-sdk-path.bat android.bat`.gsub('\\tools','').gsub('\\', '\\\\\\\\') : `which android`.gsub(/\/tools\/android$/,'').chomp @android_dir = File.expand_path(File.dirname(__FILE__).gsub('lib','')) @framework_dir = File.join(@android_dir, "framework") @icon = File.join(@www, 'icon.png')