├── iphone ├── .gitignore ├── PhoneGapLib │ ├── VERSION │ ├── .gitignore │ ├── javascripts │ │ ├── plugins │ │ │ └── README.md │ │ └── core │ │ │ ├── bonjour.js │ │ │ ├── map.js │ │ │ ├── telephony.js │ │ │ ├── device.js │ │ │ ├── sms.js │ │ │ ├── camera.js │ │ │ ├── acceleration.js │ │ │ ├── file.js │ │ │ ├── media.js │ │ │ ├── position.js │ │ │ ├── network.js │ │ │ ├── notification.js │ │ │ ├── contact.js │ │ │ ├── accelerometer.js │ │ │ └── orientation.js │ ├── PhoneGapLib_Prefix.pch │ ├── Classes │ │ ├── File.m │ │ ├── File.h │ │ ├── Map.m │ │ ├── OCCFObject.h │ │ ├── Map.h │ │ ├── Device.h │ │ ├── Categories.h │ │ ├── DebugConsole.h │ │ ├── Bonjour.h │ │ ├── Network.h │ │ ├── Accelerometer.h │ │ ├── DebugConsole.m │ │ ├── OCABMutableMultiValue.h │ │ ├── Bonjour.m │ │ ├── InvokedUrlCommand.h │ │ ├── PhoneGapViewController.h │ │ ├── LoadingView.h │ │ ├── PhoneGapCommand.h │ │ ├── NSData+Base64.h │ │ ├── OCABRecord.h │ │ ├── Image.h │ │ ├── Notification.h │ │ ├── Movie.h │ │ ├── Device.m │ │ ├── OCCFObject.m │ │ ├── Categories.m │ │ ├── PhoneGapCommand.m │ │ ├── Location.h │ │ ├── Camera.h │ │ ├── Sound.h │ │ ├── UIControls.h │ │ ├── PhoneGapDelegate.h │ │ ├── OCABMutableMultiValue.m │ │ ├── Network.m │ │ ├── PhoneGapViewController.m │ │ └── JSON │ │ │ ├── NSString+SBJSON.m │ │ │ ├── NSObject+SBJSON.m │ │ │ ├── JSON.h │ │ │ ├── NSString+SBJSON.h │ │ │ └── NSObject+SBJSON.h │ └── Makefile ├── PhoneGapLibInstaller │ ├── scripts │ │ ├── xcodetemplate.preinstall │ │ └── xcodevars.postinstall │ ├── docs │ │ ├── introduction.txt │ │ ├── finishup.txt │ │ └── readme.txt │ └── PhoneGapLibInstaller.pmdoc │ │ ├── 02phonegaplib.xml │ │ ├── 01phonegap.xml │ │ ├── 01phonegap-contents.xml │ │ └── index.xml ├── PhoneGap-based Application │ ├── ___PROJECTNAME___.xcodeproj │ │ ├── TemplateIcon.icns │ │ └── TemplateInfo.plist │ ├── ___PROJECTNAMEASIDENTIFIER____Prefix.pch │ ├── Classes │ │ ├── ___PROJECTNAMEASIDENTIFIER___AppDelegate.h │ │ └── ___PROJECTNAMEASIDENTIFIER___AppDelegate.m │ ├── main.m │ ├── ___PROJECTNAMEASIDENTIFIER___-Info.plist │ └── www │ │ └── master.css ├── Makefile └── build.sh ├── .gitignore ├── blackberry ├── framework │ ├── .gitignore │ ├── src │ │ ├── com │ │ │ ├── nitobi │ │ │ │ └── phonegap │ │ │ │ │ ├── io │ │ │ │ │ ├── SecondaryResourceFetchThread.java │ │ │ │ │ ├── PrimaryResourceFetchThread.java │ │ │ │ │ ├── Callback.java │ │ │ │ │ └── AsynchronousResourceFetcher.java │ │ │ │ │ └── api │ │ │ │ │ ├── impl │ │ │ │ │ ├── OrientationCommand.java │ │ │ │ │ ├── ExitCommand.java │ │ │ │ │ └── TelephonyCommand.java │ │ │ │ │ └── Command.java │ │ │ └── twmacinta │ │ │ │ └── util │ │ │ │ └── MD5State.java │ │ └── www │ │ │ └── master.css │ ├── .classpath │ ├── .project │ └── phonegap.jdp ├── util │ ├── bb-ant-tools.jar │ └── AUTHORS ├── js │ ├── utility.js │ ├── telephony.js │ ├── camera.js │ ├── sms.js │ ├── acceleration.js │ ├── media.js │ ├── notification.js │ ├── position.js │ ├── phonegap.js │ ├── network.js │ ├── file.js │ ├── contacts.js │ ├── accelerometer.js │ ├── device.js │ └── orientation.js └── Makefile ├── android ├── .gitignore ├── framework │ ├── res │ │ ├── drawable │ │ │ └── icon.png │ │ ├── values │ │ │ └── strings.xml │ │ └── layout │ │ │ ├── main.xml │ │ │ └── preview.xml │ ├── libs │ │ └── commons-codec-1.3.jar │ ├── README │ ├── .classpath │ ├── local.properties │ ├── default.properties │ ├── src │ │ └── com │ │ │ └── phonegap │ │ │ ├── CameraLauncher.java │ │ │ ├── StandAlone.java │ │ │ ├── GeoBroker.java │ │ │ ├── NetworkManager.java │ │ │ ├── TempListener.java │ │ │ ├── CompassListener.java │ │ │ ├── HttpHandler.java │ │ │ ├── AccelListener.java │ │ │ ├── GeoListener.java │ │ │ └── Orientation.java │ ├── .project │ ├── gen │ │ └── com │ │ │ └── phonegap │ │ │ └── R.java │ ├── export-phonegap.jardesc │ ├── assets │ │ └── www │ │ │ └── master.css │ └── AndroidManifest.xml ├── js │ ├── camera.js │ ├── device.js │ ├── media.js │ ├── contact.js │ ├── network.js │ ├── position.js │ ├── notification.js │ └── accelerometer.js ├── README.md └── build.rb ├── symbian.wrt ├── www │ ├── Icon.png │ ├── beep.mp3 │ ├── beep2.mp3 │ ├── js │ │ └── phonegap.js │ ├── assets │ │ ├── nitobi-avatar.png │ │ └── master.css │ ├── symbian.wrt.demo.app.wgz │ ├── Info.plist │ └── index.html └── javascripts │ ├── camera │ ├── s60_camera.js │ ├── com.nokia.device.camera.js │ ├── com.nokia.device.utility.js │ └── com.nokia.device.framework.js │ ├── acceleration.js │ ├── media.js │ ├── phonegap.js.base │ ├── camera.js │ ├── device.js │ ├── position.js │ ├── sms.js │ ├── storage.js │ └── notification.js └── winmo ├── www ├── media │ ├── bird.mp3 │ └── applause.wav ├── js │ ├── media.js │ └── device.js └── index.html ├── Command.cs ├── Program.cs ├── CommandManager.cs └── WebForm.Designer.cs /iphone/.gitignore: -------------------------------------------------------------------------------- 1 | build -------------------------------------------------------------------------------- /iphone/PhoneGapLib/VERSION: -------------------------------------------------------------------------------- 1 | 0.8.2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .*.sw? 3 | *.cso 4 | tmp 5 | lib 6 | docs -------------------------------------------------------------------------------- /blackberry/framework/.gitignore: -------------------------------------------------------------------------------- 1 | .tmp 2 | .settings 3 | bin/* 4 | .project.old -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | default.properties 2 | bin 3 | gen 4 | assets/www/phonegap.js -------------------------------------------------------------------------------- /iphone/PhoneGapLib/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | *.pbxuser 3 | *.perspectivev3 4 | *.mode1v3 5 | -------------------------------------------------------------------------------- /symbian.wrt/www/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/www/Icon.png -------------------------------------------------------------------------------- /symbian.wrt/www/beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/www/beep.mp3 -------------------------------------------------------------------------------- /symbian.wrt/www/beep2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/www/beep2.mp3 -------------------------------------------------------------------------------- /winmo/www/media/bird.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/winmo/www/media/bird.mp3 -------------------------------------------------------------------------------- /winmo/www/media/applause.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/winmo/www/media/applause.wav -------------------------------------------------------------------------------- /symbian.wrt/www/js/phonegap.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/www/js/phonegap.js -------------------------------------------------------------------------------- /blackberry/util/bb-ant-tools.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/blackberry/util/bb-ant-tools.jar -------------------------------------------------------------------------------- /android/framework/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/android/framework/res/drawable/icon.png -------------------------------------------------------------------------------- /symbian.wrt/www/assets/nitobi-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/www/assets/nitobi-avatar.png -------------------------------------------------------------------------------- /symbian.wrt/www/symbian.wrt.demo.app.wgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/www/symbian.wrt.demo.app.wgz -------------------------------------------------------------------------------- /winmo/www/js/media.js: -------------------------------------------------------------------------------- 1 | var media = { 2 | playSound: function(filename) { 3 | device.exec("media",[filename]); 4 | } 5 | }; -------------------------------------------------------------------------------- /android/framework/libs/commons-codec-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/android/framework/libs/commons-codec-1.3.jar -------------------------------------------------------------------------------- /symbian.wrt/javascripts/camera/s60_camera.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/javascripts/camera/s60_camera.js -------------------------------------------------------------------------------- /symbian.wrt/javascripts/camera/com.nokia.device.camera.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/javascripts/camera/com.nokia.device.camera.js -------------------------------------------------------------------------------- /symbian.wrt/javascripts/camera/com.nokia.device.utility.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/javascripts/camera/com.nokia.device.utility.js -------------------------------------------------------------------------------- /symbian.wrt/javascripts/camera/com.nokia.device.framework.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/symbian.wrt/javascripts/camera/com.nokia.device.framework.js -------------------------------------------------------------------------------- /iphone/PhoneGapLibInstaller/scripts/xcodetemplate.preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/PhoneGap/PhoneGap-based\ Application 3 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/javascripts/plugins/README.md: -------------------------------------------------------------------------------- 1 | Phonegap Javascript Plugins 2 | ============================================================= 3 | This is where you would put your Javascript plugin code. TBD -------------------------------------------------------------------------------- /blackberry/framework/src/com/nitobi/phonegap/io/SecondaryResourceFetchThread.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/blackberry/framework/src/com/nitobi/phonegap/io/SecondaryResourceFetchThread.java -------------------------------------------------------------------------------- /iphone/PhoneGap-based Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Todo/phonegap/master/iphone/PhoneGap-based Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /android/framework/README: -------------------------------------------------------------------------------- 1 | Note: phonegap.js goes in the assets/www directory. To get this file, please 2 | build it from the top level by running make: 3 | 4 | make 5 | 6 | The file will be concatenated and minified, and will be stored in lib/android 7 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/PhoneGapLib_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/File.m: -------------------------------------------------------------------------------- 1 | // 2 | // File.m 3 | // PhoneGap 4 | // 5 | // Created by Nitobi on 19/12/08. 6 | // Copyright 2008 Nitobi. All rights reserved. 7 | // 8 | 9 | #import "File.h" 10 | 11 | 12 | @implementation File 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /android/framework/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | PhoneGap 4 | file:///android_asset/www/index.html 5 | Snap 6 | 7 | -------------------------------------------------------------------------------- /winmo/Command.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace PhoneGap { 6 | 7 | public interface Command { 8 | String execute(String instruction); 9 | Boolean accept(String instruction); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /iphone/PhoneGap-based Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/File.h: -------------------------------------------------------------------------------- 1 | // 2 | // File.h 3 | // PhoneGap 4 | // 5 | // Created by Nitobi on 19/12/08. 6 | // Copyright 2008 Nitobi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface File : NSObject { 13 | 14 | } 15 | 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /blackberry/js/utility.js: -------------------------------------------------------------------------------- 1 | function Utility() { 2 | 3 | }; 4 | 5 | /** 6 | * Closes the application. 7 | */ 8 | Utility.prototype.exit = function() { 9 | var params = []; 10 | PhoneGap.exec("exit", params); 11 | } 12 | 13 | if (typeof navigator.utility == "undefined") navigator.utility = new Utility(); 14 | -------------------------------------------------------------------------------- /winmo/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace PhoneGap { 6 | 7 | static class Program { 8 | 9 | [MTAThread] 10 | static void Main() { 11 | Application.Run(new WebForm()); 12 | } 13 | 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /blackberry/framework/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Map.m: -------------------------------------------------------------------------------- 1 | // 2 | // Map.m 3 | // PhoneGap 4 | // 5 | // Created by Brant Vasilieff on 3/4/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Map.h" 10 | 11 | 12 | @implementation Map 13 | 14 | - (void)open:(NSArray*)arguments withDict:(NSDictionary*)options 15 | { 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/javascripts/core/bonjour.js: -------------------------------------------------------------------------------- 1 | // --- BjV Additions for 360/iDev 2 | Bonjour = function() { 3 | } 4 | 5 | Bonjour.prototype.port = 0; 6 | Bonjour.prototype.start = function(name) { 7 | PhoneGap.exec("Bonjour.start"); 8 | } 9 | Bonjour.prototype.stop = function() { 10 | PhoneGap.exec("Bonjour.stop"); 11 | } 12 | Bonjour.prototype.delegate = null; 13 | -------------------------------------------------------------------------------- /iphone/PhoneGapLibInstaller/scripts/xcodevars.postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | defaults write /Library/Preferences/com.phonegap.phonegaplib InstallLocation "$2" 3 | defaults write ~/Library/Preferences/com.apple.Xcode PBXApplicationwideBuildSettings -dict-add PHONEGAPLIB "$2" 4 | defaults write ~/Library/Preferences/com.apple.Xcode PBXSourceTreeDisplayNames -dict-add PHONEGAPLIB "" 5 | 6 | -------------------------------------------------------------------------------- /iphone/PhoneGapLibInstaller/docs/introduction.txt: -------------------------------------------------------------------------------- 1 | PREVIEW VERSION 20091103 2 | 3 | PhoneGapLib is a static library that enables users to include PhoneGap in their iPhone application projects easily, and also create new PhoneGap based iPhone application projects through a Xcode project template. 4 | 5 | 20091103 6 | - fixed permissions and initial run problems 7 | 8 | 20091030 9 | - initial release -------------------------------------------------------------------------------- /android/framework/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/OCCFObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // OCCFObject.h 3 | // PhoneGap 4 | // 5 | // Created by shazron on 28/05/09. 6 | // Copyright 2009 Nitobi Software Inc.. All rights reserved. 7 | // 8 | 9 | @interface OCCFObject : NSObject { 10 | CFTypeRef __baseRef; 11 | } 12 | 13 | - initWithCFTypeRef:(CFTypeRef)ref; 14 | - (CFTypeRef) CFTypeRef; 15 | - (BOOL) isEqual:other; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Map.h: -------------------------------------------------------------------------------- 1 | // 2 | // Map.h 3 | // PhoneGap 4 | // 5 | // Created by Brant Vasilieff on 3/4/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapCommand.h" 11 | 12 | @interface Map : PhoneGapCommand { 13 | } 14 | 15 | - (void)open:(NSArray*)arguments withDict:(NSDictionary*)options; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Device.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Device.h 3 | * Used to display Device centric details handset. 4 | * 5 | * Created by Nitobi on 12/12/08. 6 | * Copyright 2008 Nitobi. All rights reserved. 7 | */ 8 | 9 | #import 10 | #import 11 | #import "PhoneGapCommand.h" 12 | 13 | @interface Device : PhoneGapCommand { 14 | } 15 | 16 | - (NSDictionary*) deviceProperties; 17 | 18 | @end -------------------------------------------------------------------------------- /iphone/PhoneGap-based Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | This template provides a starting point for a PhoneGap based application. Just modify the www folder contents with your HTML, CSS and Javascript. 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/framework/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /iphone/PhoneGap-based Application/Classes/___PROJECTNAMEASIDENTIFIER___AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ___PROJECTNAMEASIDENTIFIER___AppDelegate.h 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapDelegate.h" 11 | 12 | @interface ___PROJECTNAMEASIDENTIFIER___AppDelegate : PhoneGapDelegate { 13 | } 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Categories.h: -------------------------------------------------------------------------------- 1 | // 2 | // Categories.h 3 | // PhoneGap 4 | // 5 | // Created by Shazron Abdullah on 26/05/09. 6 | // Copyright 2009 Nitobi Software. All rights reserved. 7 | // 8 | 9 | 10 | @interface NSMutableDictionary(NSDictionary_Extension) 11 | 12 | - (bool) existsValue:(NSString*)expectedValue forKey:(NSString*)key; 13 | - (NSUInteger) integerValueForKey:(NSString*)key defaultValue:(NSUInteger)defaultValue withRange:(NSRange)range; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/DebugConsole.h: -------------------------------------------------------------------------------- 1 | // 2 | // DebugConsole.h 3 | // PhoneGap 4 | // 5 | // Created by Michael Nachbaur on 14/03/09. 6 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "PhoneGapCommand.h" 12 | 13 | @interface DebugConsole : PhoneGapCommand { 14 | } 15 | 16 | - (void)log:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/javascripts/core/map.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class provides access to native mapping applications on the device. 3 | */ 4 | function Map() { 5 | 6 | } 7 | 8 | /** 9 | * Shows a native map on the device with pins at the given positions. 10 | * @param {Array} positions 11 | */ 12 | Map.prototype.show = function(positions) { 13 | 14 | } 15 | 16 | PhoneGap.addConstructor(function() { 17 | if (typeof navigator.map == "undefined") navigator.map = new Map(); 18 | }); 19 | -------------------------------------------------------------------------------- /android/framework/local.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked in Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | 7 | # location of the SDK. This is only used by Ant 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk-location=/home/bowserj/android-sdk-linux_x86-1.6_r1 11 | -------------------------------------------------------------------------------- /blackberry/js/telephony.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class provides access to the telephony features of the device. 3 | * @constructor 4 | */ 5 | function Telephony() { 6 | 7 | } 8 | 9 | /** 10 | * Calls the specifed number. 11 | * @param {Integer} number The number to be called. 12 | */ 13 | Telephony.prototype.send = function(number) { 14 | this.number = number; 15 | PhoneGap.exec("send", [this.number]); 16 | } 17 | 18 | if (typeof navigator.telephony == "undefined") navigator.telephony = new Telephony(); 19 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/javascripts/core/telephony.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class provides access to the telephony features of the device. 3 | * @constructor 4 | */ 5 | function Telephony() { 6 | 7 | } 8 | 9 | /** 10 | * Calls the specifed number. 11 | * @param {Integer} number The number to be called. 12 | */ 13 | Telephony.prototype.call = function(number) { 14 | 15 | } 16 | 17 | PhoneGap.addConstructor(function() { 18 | if (typeof navigator.telephony == "undefined") navigator.telephony = new Telephony(); 19 | }); 20 | -------------------------------------------------------------------------------- /iphone/PhoneGap-based Application/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, @"___PROJECTNAMEASIDENTIFIER___AppDelegate"); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /android/framework/default.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "build.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | apk-configurations= 11 | # Project target. 12 | target=android-5 13 | # Indicates whether an apk should be generated for each density. 14 | split.density=false 15 | -------------------------------------------------------------------------------- /symbian.wrt/www/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DisplayName 6 | phonegap.wrt 7 | Identifier 8 | com.phonegap.basic.widget 9 | Version 10 | 1.0 11 | AllowNetworkAccess 12 | 13 | MainHTML 14 | index.html 15 | MiniViewEnabled 16 | 17 | 18 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Bonjour.h: -------------------------------------------------------------------------------- 1 | // 2 | // Bonjour.h 3 | // PhoneGap 4 | // 5 | // Created by Brant Vasilieff on 3/1/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "PhoneGapCommand.h" 12 | 13 | @interface Bonjour : PhoneGapCommand 14 | { 15 | NSString* __identifier; 16 | } 17 | 18 | - (void)start:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 19 | - (void)stop:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Network.h: -------------------------------------------------------------------------------- 1 | // 2 | // Network.h 3 | // PhoneGap 4 | // 5 | // Created by Shazron Abdullah on 29/07/09. 6 | // Copyright 2009 Nitobi Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapCommand.h" 11 | 12 | @class Reachability; 13 | 14 | @interface Network : PhoneGapCommand { 15 | 16 | } 17 | 18 | - (void) isReachable:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 19 | 20 | - (void) reachabilityChanged:(NSNotification *)note; 21 | - (void) updateReachability:(NSString*)callback; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /iphone/PhoneGapLibInstaller/docs/finishup.txt: -------------------------------------------------------------------------------- 1 | Thanks for installing PhoneGapLib! 2 | 3 | To get started creating PhoneGap projects, launch Xcode, then under the File menu, select "New Project...". 4 | 5 | Navigate to the "User Templates" section, select PhoneGap, then in the right pane, select "PhoneGap-based Application" 6 | 7 | Select the "Choose..." button, name your project and choose the location where you want the new project to be. 8 | 9 | That's it! Modify the contents of the "www" directory to add your HTML, CSS and Javascript. 10 | 11 | http://www.phonegap.com 12 | http://github.com/phonegap -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Accelerometer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Accelerometer.h 3 | * 4 | * Created by Nitobi on 28/10/09. 5 | * Copyright 2009 Nitobi. All rights reserved. 6 | * 7 | */ 8 | 9 | #import 10 | #import "PhoneGapCommand.h" 11 | 12 | 13 | 14 | @interface Accelerometer : PhoneGapCommand 15 | { 16 | bool _bIsRunning; 17 | 18 | } 19 | 20 | 21 | 22 | - (void)start:(NSMutableArray*)arguments 23 | withDict:(NSMutableDictionary*)options; 24 | 25 | 26 | - (void)stop:(NSMutableArray*)arguments 27 | withDict:(NSMutableDictionary*)options; 28 | 29 | @end 30 | 31 | 32 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/DebugConsole.m: -------------------------------------------------------------------------------- 1 | // 2 | // DebugConsole.m 3 | // PhoneGap 4 | // 5 | // Created by Michael Nachbaur on 14/03/09. 6 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 7 | // 8 | 9 | #import "DebugConsole.h" 10 | 11 | @implementation DebugConsole 12 | 13 | - (void)log:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 14 | { 15 | NSString* message = [arguments objectAtIndex:0]; 16 | NSString* log_level = @"INFO"; 17 | if ([options objectForKey:@"logLevel"]) 18 | log_level = [options objectForKey:@"logLevel"]; 19 | 20 | NSLog(@"[%@] %@", log_level, message); 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/OCABMutableMultiValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // OCABMutableMultiValue.h 3 | // PhoneGap 4 | // 5 | // Created by shazron on 29/05/09. 6 | // Copyright 2009 Nitobi Software Inc.. All rights reserved. 7 | // 8 | 9 | @class OCCFObject; 10 | 11 | @interface OCABMutableMultiValue : OCCFObject { 12 | 13 | } 14 | 15 | - (ABMutableMultiValueRef) ABMutableMultiValueRef; 16 | - (CFIndex) count; 17 | 18 | - (NSString*) labelAt:(CFIndex)index; 19 | - (NSString*) localizedLabelAt:(CFIndex)index; 20 | - (NSString*) valueAt:(CFIndex)index; 21 | - (BOOL) addValue:(CFTypeRef)value withLabel:(CFStringRef)label; 22 | 23 | - (NSString*) JSONValue; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/Bonjour.m: -------------------------------------------------------------------------------- 1 | // 2 | // Bonjour.m 3 | // PhoneGap 4 | // 5 | // Created by Brant Vasilieff on 3/1/09. 6 | // Copyright 2009 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Bonjour.h" 10 | 11 | 12 | @implementation Bonjour 13 | 14 | - (void)start:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 15 | { 16 | } 17 | 18 | - (void)stop:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 19 | { 20 | } 21 | 22 | - (id)init 23 | { 24 | if (self = [super init]) 25 | { 26 | __identifier = nil; 27 | } 28 | return self; 29 | } 30 | 31 | - (void)dealloc 32 | { 33 | [__identifier release]; 34 | [super dealloc]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /iphone/PhoneGapLibInstaller/docs/readme.txt: -------------------------------------------------------------------------------- 1 | This installer will only install items under your home folder (signified by ~) 2 | 3 | Items that will be installed: 4 | (1) Xcode global var in ~/Library/Preferences/com.apple.Xcode.plist (which will be listed under Xcode Preferences -> Source Trees) 5 | (2) PhoneGapLib Xcode static library project under ~/Documents/PhoneGapLib 6 | (3) Xcode project template in ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/PhoneGap 7 | 8 | To uninstall: 9 | (1) Remove the PHONEGAPLIB value in Xcode Preferences -> Source Trees 10 | (2) Delete the ~/Documents/PhoneGapLib folder 11 | (3) Delete the ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/PhoneGap folder -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/InvokedUrlCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // InvokedUrlCommand.h 3 | // PhoneGap 4 | // 5 | // Created by Shazron Abdullah on 13/08/09. 6 | // Copyright 2009 Nitobi Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface InvokedUrlCommand : NSObject { 13 | NSString* command; 14 | NSString* className; 15 | NSString* methodName; 16 | NSMutableArray* arguments; 17 | NSMutableDictionary* options; 18 | } 19 | 20 | @property(retain) NSMutableArray* arguments; 21 | @property(retain) NSMutableDictionary* options; 22 | @property(copy) NSString* command; 23 | @property(copy) NSString* className; 24 | @property(copy) NSString* methodName; 25 | 26 | + (InvokedUrlCommand*) newFromUrl:(NSURL*)url; 27 | 28 | - (void) dealloc; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /android/framework/src/com/phonegap/CameraLauncher.java: -------------------------------------------------------------------------------- 1 | package com.phonegap; 2 | 3 | import android.webkit.WebView; 4 | 5 | 6 | public class CameraLauncher { 7 | 8 | private WebView mAppView; 9 | private DroidGap mGap; 10 | int quality; 11 | 12 | CameraLauncher(WebView view, DroidGap gap) 13 | { 14 | mAppView = view; 15 | mGap = gap; 16 | } 17 | 18 | public void takePicture(int quality) 19 | { 20 | mGap.startCamera(quality); 21 | } 22 | 23 | /* Return Base64 Encoded String to Javascript */ 24 | public void processPicture( String js_out ) 25 | { 26 | mAppView.loadUrl("javascript:navigator.camera.win('" + js_out + "');"); 27 | } 28 | 29 | public void failPicture(String err) 30 | { 31 | mAppView.loadUrl("javascript:navigator.camera.fail('" + err + "');"); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/PhoneGapViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhoneGapViewController.h 3 | // PhoneGap 4 | // 5 | // Created by Nitobi on 15/12/08. 6 | // Copyright 2008 Nitobi. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import 12 | 13 | @interface PhoneGapViewController : UIViewController { 14 | IBOutlet UIWebView *webView; 15 | BOOL autoRotate; 16 | NSString *rotateOrientation; 17 | } 18 | 19 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 20 | - (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration; 21 | - (void)setAutoRotate:(BOOL) shouldRotate; 22 | - (void)setRotateOrientation:(NSString*) orientation; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /blackberry/framework/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PhoneGap 4 | 5 | 6 | 7 | 8 | 9 | net.rim.eide.RIMResourcesBuilder 10 | 11 | 12 | 13 | 14 | net.rim.eide.PreprocessBuilder 15 | 16 | 17 | 18 | 19 | net.rim.eide.JavaIncrementalProjectBuilder 20 | 21 | 22 | 23 | 24 | 25 | net.rim.eide.rimnature 26 | org.eclipse.jdt.core.javanature 27 | net.rim.eide.PreprocessingNature 28 | 29 | 30 | -------------------------------------------------------------------------------- /blackberry/js/camera.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class provides access to the device camera. 3 | * @constructor 4 | */ 5 | function Camera() { 6 | this.onSuccess = null; 7 | this.onError = null; 8 | } 9 | 10 | /** 11 | * 12 | * @param {Function} successCallback 13 | * @param {Function} errorCallback 14 | * @param {Object} options 15 | */ 16 | Camera.prototype.getPicture = function(successCallback, errorCallback, options) { 17 | if (device.hasCamera) { 18 | if (successCallback) this.onSuccess = successCallback; 19 | else this.onSuccess = null; 20 | if (errorCallback) this.onError = errorCallback; 21 | else this.onError = null; 22 | PhoneGap.exec("camera", ["picture"]); 23 | } else errorCallback("[PhoneGap] Camera not supported on this device."); 24 | } 25 | 26 | if (typeof navigator.camera == "undefined") navigator.camera = new Camera(); 27 | -------------------------------------------------------------------------------- /winmo/CommandManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace PhoneGap { 6 | 7 | class CommandManager { 8 | 9 | private Command[] commands = new Command[2]; 10 | 11 | public CommandManager() { 12 | commands[0] = new InitializationCommand(); 13 | commands[1] = new MediaCommand(); 14 | } 15 | 16 | public String processInstruction(String instruction) { 17 | for (int index = 0; index < commands.Length; index++) { 18 | Command command = (Command) commands[index]; 19 | if (command.accept(instruction)) 20 | try { 21 | return command.execute(instruction); 22 | } catch(Exception e) { 23 | 24 | } 25 | } 26 | return null; 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/javascripts/core/device.js: -------------------------------------------------------------------------------- 1 | /** 2 | * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the 3 | * phone, etc. 4 | * @constructor 5 | */ 6 | function Device() 7 | { 8 | this.platform = null; 9 | this.version = null; 10 | this.name = null; 11 | this.gap = null; 12 | this.uuid = null; 13 | try 14 | { 15 | this.platform = DeviceInfo.platform; 16 | this.version = DeviceInfo.version; 17 | this.name = DeviceInfo.name; 18 | this.gap = DeviceInfo.gap; 19 | this.uuid = DeviceInfo.uuid; 20 | 21 | } 22 | catch(e) 23 | { 24 | // TODO: 25 | } 26 | this.available = PhoneGap.available = this.uuid != null; 27 | } 28 | 29 | PhoneGap.addConstructor(function() { 30 | navigator.device = window.device = new Device(); 31 | }); 32 | -------------------------------------------------------------------------------- /android/framework/src/com/phonegap/StandAlone.java: -------------------------------------------------------------------------------- 1 | package com.phonegap; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | import android.app.Activity; 6 | import android.os.Bundle; 7 | 8 | public class StandAlone extends DroidGap { 9 | 10 | @Override 11 | public void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | 14 | /* Load a URI from the strings.xml file */ 15 | Class c = R.string.class; 16 | Field f; 17 | String uri; 18 | 19 | int i = 0; 20 | 21 | try { 22 | f = c.getField("url"); 23 | i = f.getInt(f); 24 | uri = this.getResources().getString(i); 25 | } catch (Exception e) 26 | { 27 | uri = "http://www.phonegap.com"; 28 | } 29 | super.loadUrl(uri); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/LoadingView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingView.h 3 | // LoadingView 4 | // 5 | // Created by Matt Gallagher on 12/04/09. 6 | // Copyright Matt Gallagher 2009. All rights reserved. 7 | // 8 | // Permission is given to use this source code file without charge in any 9 | // project, commercial or otherwise, entirely at your risk, with the condition 10 | // that any redistribution (in part or whole) of source code must retain 11 | // this copyright and permission notice. Attribution in compiled projects is 12 | // appreciated but not required. 13 | // 14 | 15 | #import 16 | 17 | @interface LoadingView : UIView 18 | { 19 | NSTimeInterval minDuration; 20 | NSDate* timestamp; 21 | } 22 | 23 | @property NSTimeInterval minDuration; 24 | @property (retain) NSDate* timestamp; 25 | 26 | + (id)loadingViewInView:(UIView *)aSuperview; 27 | - (void)removeView; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/Classes/PhoneGapCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhoneGapCommand.h 3 | // PhoneGap 4 | // 5 | // Created by Michael Nachbaur on 13/04/09. 6 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class PhoneGapDelegate; 13 | 14 | @interface PhoneGapCommand : NSObject { 15 | UIWebView* webView; 16 | NSDictionary* settings; 17 | } 18 | @property (nonatomic, retain) UIWebView *webView; 19 | @property (nonatomic, retain) NSDictionary *settings; 20 | 21 | -(PhoneGapCommand*) initWithWebView:(UIWebView*)theWebView settings:(NSDictionary*)classSettings; 22 | -(PhoneGapCommand*) initWithWebView:(UIWebView*)theWebView; 23 | 24 | -(PhoneGapDelegate*) appDelegate; 25 | -(UIViewController*) appViewController; 26 | 27 | - (void) writeJavascript:(NSString*)javascript; 28 | - (void) clearCaches; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /iphone/PhoneGapLib/javascripts/core/sms.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This class provides access to the device SMS functionality. 3 | * @constructor 4 | */ 5 | function Sms() { 6 | 7 | } 8 | 9 | /** 10 | * Sends an SMS message. 11 | * @param {Integer} number The phone number to send the message to. 12 | * @param {String} message The contents of the SMS message to send. 13 | * @param {Function} successCallback The function to call when the SMS message is sent. 14 | * @param {Function} errorCallback The function to call when there is an error sending the SMS message. 15 | * @param {PositionOptions} options The options for accessing the GPS location such as timeout and accuracy. 16 | */ 17 | Sms.prototype.send = function(number, message, successCallback, errorCallback, options) { 18 | 19 | } 20 | 21 | PhoneGap.addConstructor(function() { 22 | if (typeof navigator.sms == "undefined") navigator.sms = new Sms(); 23 | }); 24 | -------------------------------------------------------------------------------- /winmo/www/js/device.js: -------------------------------------------------------------------------------- 1 | var device = { 2 | init: function() { 3 | this.exec("initialize"); 4 | // For some reason, in WinMo v6.0, we need to delay setting device.available because device.name does not exist yet. 5 | // A 10ms delay is sufficient for the variable to be visible. 6 | setTimeout('device.available = typeof(device.name) == "string";',10); 7 | }, 8 | exec: function(command, params) { 9 | if (device.available || command == "initialize") { 10 | try { 11 | var url = "http://gap.exec/" + command; 12 | if (params) url += "/" + params.join("/"); 13 | window.location.href = url; 14 | } catch(e) { 15 | console.log("Command '" + command + "' has not been executed, because of exception: " + e); 16 | alert("Error executing command '" + command + "'."); 17 | } 18 | } 19 | } 20 | }; -------------------------------------------------------------------------------- /android/framework/res/layout/preview.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 |