Skip to content

Commit

Permalink
WFK2-562 Incorporate Forge 2 usage in TicketMonster.
Browse files Browse the repository at this point in the history
Also updated the screenshots for JBDS 8 Beta 2.

Corrected the tutorial for Hybrid Mobile tooling changes in JBDS 8.
  • Loading branch information
VineetReynolds committed Jun 19, 2014
1 parent 800bf8b commit 19315bb
Show file tree
Hide file tree
Showing 171 changed files with 847 additions and 889 deletions.
14 changes: 14 additions & 0 deletions cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,17 @@

### 0.2.8 (Feb 05, 2014)
* Tizen support added

### 0.2.9 (Apr 17, 2014)
* CB-5105: [Android, windows8, WP, BlackBerry10] Removed dead code for device.version
* CB-6422: [windows8] use cordova/exec/proxy
* CB-6460: Update license headers
* Add NOTICE file

### 0.2.10 (Jun 05, 2014)
* CB-6127 Spanish and French Translations added. Github close #12
* Changing 1.5 to 2.0
* added firefoxos version - conversion
* added firefoxos version
* CB-6800 Add license
* CB-6491 add CONTRIBUTING.md
17 changes: 15 additions & 2 deletions cordova/plugins/org.apache.cordova.device/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.8",
"version": "0.2.10",
"name": "org.apache.cordova.device",
"cordova_name": "Device",
"description": "Cordova Device Plugin",
Expand All @@ -10,5 +10,18 @@
"cordova",
"device"
],
"engines": []
"platforms": [
"firefoxos",
"tizen",
"android",
"amazon-fireos",
"ubuntu",
"ios",
"blackberry10",
"wp7",
"wp8",
"windows8"
],
"engines": [],
"englishdoc": "<!---\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied. See the License for the\n specific language governing permissions and limitations\n under the License.\n-->\n\n# org.apache.cordova.device\n\nThis plugin defines a global `device` object, which describes the device's hardware and software.\nAlthough the object is in the global scope, it is not available until after the `deviceready` event.\n\n document.addEventListener(\"deviceready\", onDeviceReady, false);\n function onDeviceReady() {\n console.log(device.cordova);\n }\n\n## Installation\n\n cordova plugin add org.apache.cordova.device\n\n## Properties\n\n- device.cordova\n- device.model\n- device.name\n- device.platform\n- device.uuid\n- device.version\n\n## device.cordova\n\nGet the version of Cordova running on the device.\n\n### Supported Platforms\n\n- Amazon Fire OS\n- Android\n- BlackBerry 10\n- Firefox OS\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n## device.model\n\nThe `device.model` returns the name of the device's model or\nproduct. The value is set by the device manufacturer and may be\ndifferent across versions of the same product.\n\n### Supported Platforms\n\n- Android\n- BlackBerry 10\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Android: Nexus One returns \"Passion\" (Nexus One code name)\n // Motorola Droid returns \"voles\"\n // BlackBerry: Torch 9800 returns \"9800\"\n // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models\n //\n var model = device.model;\n\n### Android Quirks\n\n- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.\n\n### Tizen Quirks\n\n- Returns the device model assigned by the vendor, for example, `TIZEN`\n\n### Windows Phone 7 and 8 Quirks\n\n- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.\n\n## device.name\n\n__WARNING__: `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.\n\n## device.platform\n\nGet the device's operating system name.\n\n var string = device.platform;\n\n### Supported Platforms\n\n- Android\n- BlackBerry 10\n- Firefox OS\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Depending on the device, a few examples are:\n // - \"Android\"\n // - \"BlackBerry 10\"\n // - \"iOS\"\n // - \"WinCE\"\n // - \"Tizen\"\n var devicePlatform = device.platform;\n\n### Windows Phone 7 Quirks\n\nWindows Phone 7 devices report the platform as `WinCE`.\n\n### Windows Phone 8 Quirks\n\nWindows Phone 8 devices report the platform as `Win32NT`.\n\n## device.uuid\n\nGet the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).\n\n var string = device.uuid;\n\n### Description\n\nThe details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.\n\n### Supported Platforms\n\n- Android\n- BlackBerry 10\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Android: Returns a random 64-bit integer (as a string, again!)\n // The integer is generated on the device's first boot\n //\n // BlackBerry: Returns the PIN number of the device\n // This is a nine-digit unique integer (as a string, though!)\n //\n // iPhone: (Paraphrased from the UIDevice Class documentation)\n // Returns a string of hash values created from multiple hardware identifies.\n // It is guaranteed to be unique for every device and can't be tied\n // to the user account.\n // Windows Phone 7 : Returns a hash of device+current user,\n // if the user is not defined, a guid is generated and will persist until the app is uninstalled\n // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number\n // unique to every GSM and UMTS mobile phone.\n var deviceID = device.uuid;\n\n### iOS Quirk\n\nThe `uuid` on iOS is not unique to a device, but varies for each\napplication, for each installation. It changes if you delete and\nre-install the app, and possibly also when you upgrade iOS, or even\nupgrade the app per version (apparent in iOS 5.1). The `uuid` is not\na reliable value.\n\n### Windows Phone 7 and 8 Quirks\n\nThe `uuid` for Windows Phone 7 requires the permission\n`ID_CAP_IDENTITY_DEVICE`. Microsoft will likely deprecate this\nproperty soon. If the capability is not available, the application\ngenerates a persistent guid that is maintained for the duration of the\napplication's installation on the device.\n\n## device.version\n\nGet the operating system version.\n\n var string = device.version;\n\n### Supported Platforms\n\n- Android 2.1+\n- BlackBerry 10\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Android: Froyo OS would return \"2.2\"\n // Eclair OS would return \"2.1\", \"2.0.1\", or \"2.0\"\n // Version can also return update level \"2.1-update1\"\n //\n // BlackBerry: Torch 9800 using OS 6.0 would return \"6.0.0.600\"\n //\n // iPhone: iOS 3.2 returns \"3.2\"\n //\n // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720\n // Tizen: returns \"TIZEN_20120425_2\"\n var deviceVersion = device.version;\n\n"
}
20 changes: 19 additions & 1 deletion cordova/plugins/org.apache.cordova.device/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.device"
version="0.2.8">
version="0.2.10">
<name>Device</name>
<description>Cordova Device Plugin</description>
<license>Apache 2.0</license>
Expand Down
11 changes: 0 additions & 11 deletions cordova/plugins/org.apache.cordova.device/src/android/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Licensed to the Apache Software Foundation (ASF) under one
public class Device extends CordovaPlugin {
public static final String TAG = "Device";

public static String cordovaVersion = "dev"; // Cordova version
public static String platform; // Device OS
public static String uuid; // Device UUID

Expand Down Expand Up @@ -73,7 +72,6 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
r.put("uuid", Device.uuid);
r.put("version", this.getOSVersion());
r.put("platform", this.getPlatform());
r.put("cordova", Device.cordovaVersion);
r.put("model", this.getModel());
callbackContext.success(r);
}
Expand Down Expand Up @@ -112,15 +110,6 @@ public String getUuid() {
return uuid;
}

/**
* Get the Cordova version.
*
* @return
*/
public String getCordovaVersion() {
return Device.cordovaVersion;
}

public String getModel() {
String model = android.os.Build.MODEL;
return model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ module.exports = {
platform: "blackberry10",
version: window.qnx.webplatform.device.scmBundle,
model: modelName,
uuid: uuid,
cordova: "dev"
uuid: uuid
};

result.ok(info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,64 @@
* specific language governing permissions and limitations
* under the License.
*
*/

*/
//example UA String for Firefox OS
//Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0
var firefoxos = require('cordova/platform');
var cordova = require('cordova');

//UA parsing not recommended but currently this is the only way to get the Firefox OS version
//https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference

//Should be replaced when better conversion to Firefox OS Version is available
function convertVersionNumber(ver) {
var hashVersion = {
'18.0': '1.0.1',
'18.1': '1.1',
'26.0': '1.2',
'28.0': '1.3',
'30.0': '1.4',
'32.0': '2.0'
};
var rver = ver;
var sStr = ver.substring(0, 4);
if (hashVersion[sStr]) {
rver = hashVersion[sStr];
}
return (rver);

}
function getVersion() {
if (navigator.userAgent.match(/(mobile|tablet)/i)) {
var ffVersionArray = (navigator.userAgent.match(/Firefox\/([\d]+\.[\w]?\.?[\w]+)/));
if (ffVersionArray.length === 2) {
return (convertVersionNumber(ffVersionArray[1]));
}
}
return (null);
}

function getModel() {
var uaArray = navigator.userAgent.split(/\s*[;)(]\s*/);
if (navigator.userAgent.match(/(mobile|tablet)/i)) {
if (uaArray.length === 5) {
return (uaArray[2]);
}
}
return (null);
}
module.exports = {
getDeviceInfo: function(success, error) {
getDeviceInfo: function (success, error) {
setTimeout(function () {
success({
cordova: firefoxos.cordovaVersion,
platform: 'firefoxos',
model: null,
version: null,
model: getModel(),
version: getVersion(),
uuid: null
});
}, 0);
}
};

require("cordova/firefoxos/commandProxy").add("Device", module.exports);
require("cordova/firefoxos/commandProxy").add("Device", module.exports);
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ module.exports = {
}

setTimeout(function () {
win({ platform: "windows8", version: "8", uuid: deviceId, cordova: '0.0.0', model: window.clientInformation.platform });
win({ platform: "windows8", version: "8", uuid: deviceId, model: window.clientInformation.platform });
}, 0);
}

};

require("cordova/windows8/commandProxy").add("Device", module.exports);
require("cordova/exec/proxy").add("Device", module.exports);

14 changes: 1 addition & 13 deletions cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ public class Device : BaseCommand
public void getDeviceInfo(string notused)
{

string res = String.Format("\"name\":\"{0}\",\"cordova\":\"{1}\",\"platform\":\"{2}\",\"uuid\":\"{3}\",\"version\":\"{4}\",\"model\":\"{5}\"",
string res = String.Format("\"name\":\"{0}\",\"platform\":\"{1}\",\"uuid\":\"{2}\",\"version\":\"{3}\",\"model\":\"{4}\"",
this.name,
this.cordova,
this.platform,
this.uuid,
this.version,
this.model);



res = "{" + res + "}";
//Debug.WriteLine("Result::" + res);
DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res));
Expand All @@ -68,15 +65,6 @@ public string name
}
}

public string cordova
{
get
{
// TODO: should be able to dynamically read the Cordova version from somewhere...
return "3.0.0";
}
}

public string platform
{
get
Expand Down
13 changes: 13 additions & 0 deletions cordova/plugins/org.apache.cordova.dialogs/RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,16 @@
* CB-6422: [windows8] use cordova/exec/proxy
* CB-6460: Update license headers
* Add NOTICE file

### 0.2.8 (Jun 05, 2014)
* CB-6801 Add license
* running original windows.open, inAppBrowser is overriding it no need to place CSS in every page anymore
* CB-5945 [Windows8] do not call success callbacks until dialog is dismissed
* CB-4616 Returned index 0 was not documented for notification.prompt
* update docs to state that prompt is supported on windowsphone
* CB-6528 allow scroll on alert message content
* [CB-6628][amazon-fireos]dialogs plugin's confirm and prompt methods dont work confirm() method was missing amazon-fireos platform check. added that. prompt() method had bug. It is executed in a worker thread that does not have a message queue(or Looper object) associated with it and hence "can't create a handler" exception is thrown. To fix this issue, we need to create the EditText widget from within the UI thread. This was fixed sometime ago when we added fireos platform but commit got lost somewhere. So fixing it again now.
* CB-6491 add CONTRIBUTING.md
* Added check for isFinishing() on the parent activity to prevent crashes when trying to display dialogs when activity is in this phase of it's lifecycle
* CB-4966 Dialogs are in window now No need to add anything to manifest or index.html
* Removing FirefoxOS Quirks * no need to add special permission (it's different API with the same name) * notification.css is added automatically
21 changes: 4 additions & 17 deletions cordova/plugins/org.apache.cordova.dialogs/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,6 @@ This plugin provides access to some native dialog UI elements.

cordova plugin add org.apache.cordova.dialogs

### Firefox OS Quirks

Create __www/manifest.webapp__ as described in
[Manifest Docs](https://developer.mozilla.org/en-US/Apps/Developing/Manifest).
Add permisions:

"permissions": {
"desktop-notification": {
"description": "Describe why you need to enable notifications"
}
}

Edit __www/index.html__ and add following in `head` section:

<link rel="stylesheet" type="text/css" href="css/notification.css" />

## Methods

- `navigator.notification.alert`
Expand Down Expand Up @@ -169,7 +153,7 @@ Displays a native dialog box that is more customizable than the browser's `promp

- __message__: Dialog message. _(String)_

- __promptCallback__: Callback to invoke when a button is pressed. _(Function)_
- __promptCallback__: Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). _(Function)_

- __title__: Dialog title _(String)_ (Optional, defaults to `Prompt`)

Expand All @@ -185,6 +169,8 @@ contains the following properties:

- __buttonIndex__: The index of the pressed button. _(Number)_ Note that the index uses one-based indexing, so the value is `1`, `2`, `3`, etc.



- __input1__: The text entered in the prompt dialog box. _(String)_

### Example
Expand All @@ -207,6 +193,7 @@ contains the following properties:
- Android
- Firefox OS
- iOS
- Windows Phone 7 and 8

### Android Quirks

Expand Down
Loading

0 comments on commit 19315bb

Please sign in to comment.