Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86DF3CEEA for ; Sun, 6 May 2012 12:38:24 +0000 (UTC) Received: (qmail 5424 invoked by uid 500); 6 May 2012 12:38:24 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 5376 invoked by uid 500); 6 May 2012 12:38:24 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 5365 invoked by uid 99); 6 May 2012 12:38:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 May 2012 12:38:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8046214489; Sun, 6 May 2012 12:38:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anis@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: bada commit: updating apache licenses with apache rat Message-Id: <20120506123823.8046214489@tyr.zones.apache.org> Date: Sun, 6 May 2012 12:38:23 +0000 (UTC) Updated Branches: refs/heads/master 1edff69a0 -> 47b5bf391 updating apache licenses with apache rat Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/commit/47b5bf39 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/tree/47b5bf39 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/diff/47b5bf39 Branch: refs/heads/master Commit: 47b5bf3919a8c7bd9ff02b0d2b12d44d8cf63c69 Parents: 1edff69 Author: Anis Kadri Authored: Sun May 6 05:38:01 2012 -0700 Committer: Anis Kadri Committed: Sun May 6 05:38:01 2012 -0700 ---------------------------------------------------------------------- Res/cordova/accelerometer.js | 26 +- Res/cordova/camera.js | 26 +- Res/cordova/compass.js | 21 + Res/cordova/contact.js | 23 +- Res/cordova/cordova.base.js | 26 +- Res/cordova/cordova.bat | 20 + Res/cordova/cordova.js | 26 +- Res/cordova/debugconsole.js | 21 + Res/cordova/device.js | 21 + Res/cordova/file.js | 26 +- Res/cordova/geolocation.js | 26 +- Res/cordova/network.js | 26 +- Res/cordova/notification.js | 26 +- Res/cordova/position.js | 26 +- Res/eng-GB.xml | 31 ++- Res/index.html | 195 ++++++----- Res/main.js | 759 +++++++++++++++++++------------------ application.xml | 69 +++-- inc/Cordova.h | 143 ++++--- manifest.xml | 23 +- 20 files changed, 946 insertions(+), 614 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/accelerometer.js ---------------------------------------------------------------------- diff --git a/Res/cordova/accelerometer.js b/Res/cordova/accelerometer.js index 9941beb..c1f195b 100644 --- a/Res/cordova/accelerometer.js +++ b/Res/cordova/accelerometer.js @@ -1,10 +1,24 @@ /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ + function Acceleration(x, y, z, timestamp) { this.x = x; this.y = y; http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/camera.js ---------------------------------------------------------------------- diff --git a/Res/cordova/camera.js b/Res/cordova/camera.js index 3258f22..a44bc13 100644 --- a/Res/cordova/camera.js +++ b/Res/cordova/camera.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * This class provides access to the device camera. http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/compass.js ---------------------------------------------------------------------- diff --git a/Res/cordova/compass.js b/Res/cordova/compass.js index b300e39..a04110e 100644 --- a/Res/cordova/compass.js +++ b/Res/cordova/compass.js @@ -1,3 +1,24 @@ +/* + * + * 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. + * +*/ + /** * This class provides access to device Compass data. * @constructor http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/contact.js ---------------------------------------------------------------------- diff --git a/Res/cordova/contact.js b/Res/cordova/contact.js index 9f43907..a7968ec 100644 --- a/Res/cordova/contact.js +++ b/Res/cordova/contact.js @@ -1,10 +1,23 @@ /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * 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. + * +*/ /** * Contains information about a single contact. http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/cordova.base.js ---------------------------------------------------------------------- diff --git a/Res/cordova/cordova.base.js b/Res/cordova/cordova.base.js index aa08214..d329041 100644 --- a/Res/cordova/cordova.base.js +++ b/Res/cordova/cordova.base.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * The order of events during page load and Cordova startup is as follows: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/cordova.bat ---------------------------------------------------------------------- diff --git a/Res/cordova/cordova.bat b/Res/cordova/cordova.bat old mode 100755 new mode 100644 index 16e7ef2..c7e04cd --- a/Res/cordova/cordova.bat +++ b/Res/cordova/cordova.bat @@ -1 +1,21 @@ +rem +rem +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. +rem +rem copy /B cordova.base.js+geolocation.js+position.js+accelerometer.js+network.js+debugconsole.js+contact.js+device.js+compass.js+notification.js+camera.js cordova.js http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/cordova.js ---------------------------------------------------------------------- diff --git a/Res/cordova/cordova.js b/Res/cordova/cordova.js index 941c2bd..95125e3 100644 --- a/Res/cordova/cordova.js +++ b/Res/cordova/cordova.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * The order of events during page load and Cordova startup is as follows: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/debugconsole.js ---------------------------------------------------------------------- diff --git a/Res/cordova/debugconsole.js b/Res/cordova/debugconsole.js index 8c84de1..7f1139f 100644 --- a/Res/cordova/debugconsole.js +++ b/Res/cordova/debugconsole.js @@ -1,3 +1,24 @@ +/* + * + * 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. + * +*/ + /** * This class provides access to the debugging console. * @constructor http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/device.js ---------------------------------------------------------------------- diff --git a/Res/cordova/device.js b/Res/cordova/device.js index 9769e62..ed36c40 100644 --- a/Res/cordova/device.js +++ b/Res/cordova/device.js @@ -1,3 +1,24 @@ +/* + * + * 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. + * +*/ + /* * Cordova is available under *either* the terms of the modified BSD license *or* the http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/file.js ---------------------------------------------------------------------- diff --git a/Res/cordova/file.js b/Res/cordova/file.js index 7406349..ac316a0 100644 --- a/Res/cordova/file.js +++ b/Res/cordova/file.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * These classes provides generic read and write access to the mobile device file system. http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/geolocation.js ---------------------------------------------------------------------- diff --git a/Res/cordova/geolocation.js b/Res/cordova/geolocation.js index 7b57b2e..927d8a3 100644 --- a/Res/cordova/geolocation.js +++ b/Res/cordova/geolocation.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * This class provides access to device GPS data. http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/network.js ---------------------------------------------------------------------- diff --git a/Res/cordova/network.js b/Res/cordova/network.js index cbe3d68..19a7671 100644 --- a/Res/cordova/network.js +++ b/Res/cordova/network.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * Network status. http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/notification.js ---------------------------------------------------------------------- diff --git a/Res/cordova/notification.js b/Res/cordova/notification.js index 26bd1d3..6c07808 100644 --- a/Res/cordova/notification.js +++ b/Res/cordova/notification.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ MessageBox.MSGBOX_STYLE_NONE = 0; MessageBox.MSGBOX_STYLE_OK = 1; http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/cordova/position.js ---------------------------------------------------------------------- diff --git a/Res/cordova/position.js b/Res/cordova/position.js index 94605ab..69d356f 100644 --- a/Res/cordova/position.js +++ b/Res/cordova/position.js @@ -1,11 +1,23 @@ - /* - * Cordova is available under *either* the terms of the modified BSD license *or* the - * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. - * - * Copyright (c) 2005-2010, Nitobi Software Inc. - * Copyright (c) 2010, IBM Corporation - */ + * + * 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. + * +*/ /** * This class contains position information. http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/eng-GB.xml ---------------------------------------------------------------------- diff --git a/Res/eng-GB.xml b/Res/eng-GB.xml old mode 100755 new mode 100644 index bec69ee..ceb27fa --- a/Res/eng-GB.xml +++ b/Res/eng-GB.xml @@ -1,5 +1,26 @@ - - - + + + + + http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/index.html ---------------------------------------------------------------------- diff --git a/Res/index.html b/Res/index.html old mode 100755 new mode 100644 index 3c65c55..d3a8eb0 --- a/Res/index.html +++ b/Res/index.html @@ -1,87 +1,108 @@ - - - - Cordova Test App - - - -

-
    Debug Output
- -

Camera

-
- - -
- -
-

Geolocation

- - - -
- -
-

Accelerometer

- - - -
- -

Compass

-
- - - -
- -
-

Network

- - -
-
- -
-

Device

- - -
- -
-

DebugConsole

- - -
- -

Contact

-
- - - - -
- -

Notification

-
- - - - -
- - - - + + + + + + Cordova Test App + + + +

+
    Debug Output
+ +

Camera

+
+ + +
+ +
+

Geolocation

+ + + +
+ +
+

Accelerometer

+ + + +
+ +

Compass

+
+ + + +
+ +
+

Network

+ + +
+
+ +
+

Device

+ + +
+ +
+

DebugConsole

+ + +
+ +

Contact

+
+ + + + +
+ +

Notification

+
+ + + + +
+ + + + http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/Res/main.js ---------------------------------------------------------------------- diff --git a/Res/main.js b/Res/main.js old mode 100755 new mode 100644 index 5e2d452..e41a986 --- a/Res/main.js +++ b/Res/main.js @@ -1,369 +1,390 @@ -/* -* Cordova Sample App -* -*/ - -// Geolocation -var watchLocationID = null; - -function onGeoLocationSuccess(position) { - var element = document.getElementById('geolocation'); - element.innerHTML = 'Latitude: ' + position.coords.latitude + '
' + - 'Longitude: ' + position.coords.longitude + '
' + - '
' + element.innerHTML; -} - -function onGeoLocationError(error) { - debugPrint('code: ' + error.code + '\n' + - 'message: ' + error.message + '\n'); -} -function getCurrentPosition() { - var geolocation = document.getElementById('geolocation'); - try { - Geolocation.useCordova(); - geolocation.style.display = 'block'; - navigator.geolocation.getCurrentPosition(onGeoLocationSuccess, onGeoLocationError, { frequency: 3000 }); - } catch(e) { - alert(e.message); - } -} -function toggleWatchPosition(em) { - var geolocation = document.getElementById('geolocation'); - if(em.value == "GeoLocation.StartWatching") { - em.value = "GeoLocation.StopWatching"; - geolocation.style.display = 'block'; - try { - Geolocation.useCordova(); - watchLocationID = navigator.geolocation.watchPosition(onGeoLocationSuccess, onGeoLocationError, { frequency: 3000 }); - } catch(e) { - alert(e.message); - } - } else { - em.value = "GeoLocation.StartWatching"; - geolocation.style.display = 'none'; - try { - navigator.geolocation.clearWatch(watchLocationID); - geolocation.innerHTML = ''; - } catch(e) { - alert(e.message); - } - } -} - -// Acceleration -var watchAccelerationID = null; - -function onAccelerationSuccess(acceleration) { - var element = document.getElementById('accelerometer'); - element.innerHTML = 'Acceleration X: ' + acceleration.x + '
' + - 'Acceleration Y: ' + acceleration.y + '
' + - 'Acceleration Z: ' + acceleration.z + '
' + - 'Timestamp: ' + acceleration.timestamp + '
'; -} - -function onAccelerationError() { - alert('onError!'); -} - -function startWatchAcceleration() { - var options = { frequency: 3000 }; - watchAccelerationID = navigator.accelerometer.watchAcceleration(onAccelerationSuccess, onAccelerationError, options); -} - -function stopWatchAcceleration() { - if (watchAccelerationID) { - navigator.accelerometer.clearWatch(watchAccelerationID); - watchAccelerationID = null; - } -} - -function getCurrentAcceleration() { - var accelerometer = document.getElementById('accelerometer'); - try { - accelerometer.style.display = 'block'; - navigator.accelerometer.getCurrentAcceleration(onAccelerationSuccess, onAccelerationError, { frequency: 5000 }); - } catch(e) { - alert(e.message); - } -} - - -function toggleStartAcceleration(em) { - try { - var accelerometer = document.getElementById('accelerometer'); - if(em.value == "Accelerometer.watchAcceleration") { - em.value = "Accelerometer.clearWatch"; - accelerometer.style.display = 'block'; - startWatchAcceleration(); - } else { - em.value = "Accelerometer.watchAcceleration"; - accelerometer.style.display = 'none'; - stopWatchAcceleration(); - } - } - catch(e) { - alert(e.message); - } -} -// Utility Function -function debugPrint(body) { - var list = document.getElementById("debuglist"); - var item = document.createElement("li"); - item.appendChild(document.createTextNode(body)); - list.appendChild(item); -} - -// Stock Browser Test (Any URL request launches Stock browser) -function launchExternalBrowser() { - window.location = "http://www.phonegap.com"; -} - - -// Network -function hostIsReachable() { - try { - var network = document.getElementById('network'); - var callback = function(reachability) { - console.log(reachability); - var networkState = reachability.code; - var http_code = reachability.http_code; - var states = []; - states[NetworkStatus.NOT_REACHABLE] = 'No network connection'; - states[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection'; - states[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection'; - network.style.display = 'block'; - network.innerHTML = 'Code: '+reachability.code+' Connection type: '+states[networkState]; - } - navigator.network.isReachable("http://phonegap.com", callback, {}); - } catch(e) { - debugPrint("hostIsReachable(): "+e.message); - } -} - -// System -function getSystemInfo() { - try { - var system = document.getElementById("system"); - system.style.display = "block"; - system.innerHTML = 'Device Name: ' + device.name + '
' + - 'Device Cordova: ' + device.cordova + '
' + - 'Device Platform: ' + device.platform + '
' + - 'Device UUID: ' + device.uuid + '
' + - 'Device Version: ' + device.version + '
'; - } catch(e) { - debugPrint("Error Occured: "+e.message); - } - -} - -// DebugConsole -function Log() { - var log_statement = document.getElementById("log_statement").value; - console.log(log_statement); - console.warn(log_statement); - console.error(log_statement); - console.log({test:'pouet', test2:['pouet1', 'pouet2']}); -} - -// Contacts -function createContact() { - var myContact = navigator.service.contacts.create({displayName: "Test User"}); - myContact.gender = "male"; - console.log("The contact, "+myContact.displayName + ", is of the "+myContact.gender +" gender"); -} - -function saveContact() { - try { - var onSuccess = function(result) { - debugPrint("Save Success: "+result.message); - }; - var onError = function(contactError) { - debugPrint("Error = "+contactError.code); - }; - var contact = navigator.service.contacts.create(); - contact.name = new ContactName(); - contact.name.familyName = "Doe"; - contact.name.givenName = "John"; - contact.displayName = "John Doe"; - contact.nickname = "Plumber"; - contact.phoneNumbers = [new ContactField("Mobile", "6047894567"), new ContactField("Home", "7789989674"), new ContactField("Other", "7789989673")]; - contact.emails = [new ContactField("Personal", "nomail@noset.com"), new ContactField("Work", "nomail2@noset.com"), new ContactField("Other", "nomail3@noset.com")]; - contact.urls = [new ContactField("Work", "http://www.domain.com"), new ContactField("Personal", "http://www.domain2.com")]; - contact.organization = new ContactOrganization(); - contact.organization.name = "Nitobi Software Inc"; - contact.organization.title = "Software Engineer"; - contact.birthday = new Date(); - contact.address = new ContactAddress(); - contact.address.streetAddress = "200 Abbott Street"; - contact.address.locality = "Vancouver"; - contact.address.region = "BC"; - contact.address.postalCode = "V6Z2X6"; - contact.address.country = "Canada"; - contact.save(onSuccess, onError); - } catch(e) { - debugPrint("Error Occured: "+e.message); - } -} - -function findContact() { - try { - var onSuccess = function(contacts) { - debugPrint("Found "+contacts.length+" contacts."); -// var contacts = navigator.service.contacts.results; -// var contactStr = "IDs found: " -// for(i in contacts) { -// contactStr += contacts[i].id + " "; -// } -// debugPrint(contactStr); - }; - var onFailure = function() { - debugPrint("ERROR"); - }; - navigator.service.contacts.find(["displayName", "firstName"], onSuccess, onFailure, {filter:"7789989674"}); - } catch(e) { - debugPrint("Error Occured: "+e.message); - } -} - -function removeContacts() { - try { - var onSuccess = function(result) { - debugPrint(result.message); - }; - var onFailure = function(result) { - debugPrint("ERROR in Removing Contact: "+result.message); - }; - var toRemove = navigator.service.contacts.results; - while(toRemove.length > 0) { - var contact = toRemove.shift(); - contact.remove(onSuccess, onFailure); - } - } catch(e) { - debugPrint("Error Occured in remove Contact: "+e.message); - } -} - -// Compass -var watchCompassId = null; - -function startWatchCompass() { - var options = { frequency: 3000 }; - var onSuccess = function(compass) { - var element = document.getElementById('compass'); - element.innerHTML = 'Compass X: ' + compass.x + '
' + - 'Compass Y: ' + compass.y + '
' + - 'Compass Z: ' + compass.z + '
' + - 'Timestamp: ' + compass.timestamp + '
'; - }; - - var onFail = function() { - debugPrint('Compass Error!'); - }; - watchCompassId = navigator.compass.watchHeading(onSuccess, onFail, options); -} - -function stopWatchCompass() { - try { - navigator.compass.clearWatch(watchCompassId); - watchCompassId= null; - } catch(e) { - debugPrint("stopWatchCompass: "+e.message); - } -} - -function getCurrentHeading() { - try { - var compass = document.getElementById('compass'); - var onSuccess = function(compass) { - var element = document.getElementById('compass'); - element.innerHTML = 'Compass X: ' + compass.x + '
' + - 'Compass Y: ' + compass.y + '
' + - 'Compass Z: ' + compass.z + '
' + - 'Timestamp: ' + compass.timestamp + '
'; - } - - var onFail = function() { - debugPrint('Compass Error!'); - } - compass.style.display = 'block'; - navigator.compass.getCurrentHeading(onSuccess, onFail, { frequency: 5000 }); - } catch(e) { - alert(e.message); - } -} - - -function toggleStartCompass(em) { - try { - var compass = document.getElementById('compass'); - if(em.value == "Compass.watchHeading") { - em.value = "Compass.clearWatch"; - compass.style.display = 'block'; - startWatchCompass(); - } else { - em.value = "Compass.watchHeading"; - compass.style.display = 'none'; - stopWatchCompass(); - } - } - catch(e) { - alert(e.message); - } -} - -// Notification - -function notificationAlert() { - var complete = function(button) { - debugPrint("Alert button clicked: "+button); - } - try { - navigator.notification.alert("This is an alert Dialog",complete, "Alert Title", "OK"); - } catch(e) { - debugPrint(e.message); - } -} - -function notificationConfirm() { - var complete = function(button) { - debugPrint("Alert button clicked: "+button); - } - try { - navigator.notification.confirm("This is an alert Dialog",complete, "Alert Title", "OK,Cancel"); - } catch(e) { - debugPrint(e.message); - } -} - -function notificationVibrate() { - try { - navigator.notification.vibrate(3000); - } catch(e) { - debugPrint(e.message); - } -} -function notificationBeep() { - try { - navigator.notification.beep(4); - } catch(e) { - debugPrint(e.message); - } -} - -// Camera - -function getPicture() { - try { - var successCallback = function(uri) { - var image = document.getElementById("picture"); - debugPrint(uri); - image.src = uri; - } - var errorCallback = function(message) { - debugPrint("Camera Failed: "+message); - } - navigator.camera.getPicture(successCallback, errorCallback, {}); - } catch(e) { - debugPring(e.message); - } -} +/* + * + * 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. + * +*/ + +/* +* Cordova Sample App +* +*/ + +// Geolocation +var watchLocationID = null; + +function onGeoLocationSuccess(position) { + var element = document.getElementById('geolocation'); + element.innerHTML = 'Latitude: ' + position.coords.latitude + '
' + + 'Longitude: ' + position.coords.longitude + '
' + + '
' + element.innerHTML; +} + +function onGeoLocationError(error) { + debugPrint('code: ' + error.code + '\n' + + 'message: ' + error.message + '\n'); +} +function getCurrentPosition() { + var geolocation = document.getElementById('geolocation'); + try { + Geolocation.useCordova(); + geolocation.style.display = 'block'; + navigator.geolocation.getCurrentPosition(onGeoLocationSuccess, onGeoLocationError, { frequency: 3000 }); + } catch(e) { + alert(e.message); + } +} +function toggleWatchPosition(em) { + var geolocation = document.getElementById('geolocation'); + if(em.value == "GeoLocation.StartWatching") { + em.value = "GeoLocation.StopWatching"; + geolocation.style.display = 'block'; + try { + Geolocation.useCordova(); + watchLocationID = navigator.geolocation.watchPosition(onGeoLocationSuccess, onGeoLocationError, { frequency: 3000 }); + } catch(e) { + alert(e.message); + } + } else { + em.value = "GeoLocation.StartWatching"; + geolocation.style.display = 'none'; + try { + navigator.geolocation.clearWatch(watchLocationID); + geolocation.innerHTML = ''; + } catch(e) { + alert(e.message); + } + } +} + +// Acceleration +var watchAccelerationID = null; + +function onAccelerationSuccess(acceleration) { + var element = document.getElementById('accelerometer'); + element.innerHTML = 'Acceleration X: ' + acceleration.x + '
' + + 'Acceleration Y: ' + acceleration.y + '
' + + 'Acceleration Z: ' + acceleration.z + '
' + + 'Timestamp: ' + acceleration.timestamp + '
'; +} + +function onAccelerationError() { + alert('onError!'); +} + +function startWatchAcceleration() { + var options = { frequency: 3000 }; + watchAccelerationID = navigator.accelerometer.watchAcceleration(onAccelerationSuccess, onAccelerationError, options); +} + +function stopWatchAcceleration() { + if (watchAccelerationID) { + navigator.accelerometer.clearWatch(watchAccelerationID); + watchAccelerationID = null; + } +} + +function getCurrentAcceleration() { + var accelerometer = document.getElementById('accelerometer'); + try { + accelerometer.style.display = 'block'; + navigator.accelerometer.getCurrentAcceleration(onAccelerationSuccess, onAccelerationError, { frequency: 5000 }); + } catch(e) { + alert(e.message); + } +} + + +function toggleStartAcceleration(em) { + try { + var accelerometer = document.getElementById('accelerometer'); + if(em.value == "Accelerometer.watchAcceleration") { + em.value = "Accelerometer.clearWatch"; + accelerometer.style.display = 'block'; + startWatchAcceleration(); + } else { + em.value = "Accelerometer.watchAcceleration"; + accelerometer.style.display = 'none'; + stopWatchAcceleration(); + } + } + catch(e) { + alert(e.message); + } +} +// Utility Function +function debugPrint(body) { + var list = document.getElementById("debuglist"); + var item = document.createElement("li"); + item.appendChild(document.createTextNode(body)); + list.appendChild(item); +} + +// Stock Browser Test (Any URL request launches Stock browser) +function launchExternalBrowser() { + window.location = "http://www.phonegap.com"; +} + + +// Network +function hostIsReachable() { + try { + var network = document.getElementById('network'); + var callback = function(reachability) { + console.log(reachability); + var networkState = reachability.code; + var http_code = reachability.http_code; + var states = []; + states[NetworkStatus.NOT_REACHABLE] = 'No network connection'; + states[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection'; + states[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection'; + network.style.display = 'block'; + network.innerHTML = 'Code: '+reachability.code+' Connection type: '+states[networkState]; + } + navigator.network.isReachable("http://phonegap.com", callback, {}); + } catch(e) { + debugPrint("hostIsReachable(): "+e.message); + } +} + +// System +function getSystemInfo() { + try { + var system = document.getElementById("system"); + system.style.display = "block"; + system.innerHTML = 'Device Name: ' + device.name + '
' + + 'Device Cordova: ' + device.cordova + '
' + + 'Device Platform: ' + device.platform + '
' + + 'Device UUID: ' + device.uuid + '
' + + 'Device Version: ' + device.version + '
'; + } catch(e) { + debugPrint("Error Occured: "+e.message); + } + +} + +// DebugConsole +function Log() { + var log_statement = document.getElementById("log_statement").value; + console.log(log_statement); + console.warn(log_statement); + console.error(log_statement); + console.log({test:'pouet', test2:['pouet1', 'pouet2']}); +} + +// Contacts +function createContact() { + var myContact = navigator.service.contacts.create({displayName: "Test User"}); + myContact.gender = "male"; + console.log("The contact, "+myContact.displayName + ", is of the "+myContact.gender +" gender"); +} + +function saveContact() { + try { + var onSuccess = function(result) { + debugPrint("Save Success: "+result.message); + }; + var onError = function(contactError) { + debugPrint("Error = "+contactError.code); + }; + var contact = navigator.service.contacts.create(); + contact.name = new ContactName(); + contact.name.familyName = "Doe"; + contact.name.givenName = "John"; + contact.displayName = "John Doe"; + contact.nickname = "Plumber"; + contact.phoneNumbers = [new ContactField("Mobile", "6047894567"), new ContactField("Home", "7789989674"), new ContactField("Other", "7789989673")]; + contact.emails = [new ContactField("Personal", "nomail@noset.com"), new ContactField("Work", "nomail2@noset.com"), new ContactField("Other", "nomail3@noset.com")]; + contact.urls = [new ContactField("Work", "http://www.domain.com"), new ContactField("Personal", "http://www.domain2.com")]; + contact.organization = new ContactOrganization(); + contact.organization.name = "Nitobi Software Inc"; + contact.organization.title = "Software Engineer"; + contact.birthday = new Date(); + contact.address = new ContactAddress(); + contact.address.streetAddress = "200 Abbott Street"; + contact.address.locality = "Vancouver"; + contact.address.region = "BC"; + contact.address.postalCode = "V6Z2X6"; + contact.address.country = "Canada"; + contact.save(onSuccess, onError); + } catch(e) { + debugPrint("Error Occured: "+e.message); + } +} + +function findContact() { + try { + var onSuccess = function(contacts) { + debugPrint("Found "+contacts.length+" contacts."); +// var contacts = navigator.service.contacts.results; +// var contactStr = "IDs found: " +// for(i in contacts) { +// contactStr += contacts[i].id + " "; +// } +// debugPrint(contactStr); + }; + var onFailure = function() { + debugPrint("ERROR"); + }; + navigator.service.contacts.find(["displayName", "firstName"], onSuccess, onFailure, {filter:"7789989674"}); + } catch(e) { + debugPrint("Error Occured: "+e.message); + } +} + +function removeContacts() { + try { + var onSuccess = function(result) { + debugPrint(result.message); + }; + var onFailure = function(result) { + debugPrint("ERROR in Removing Contact: "+result.message); + }; + var toRemove = navigator.service.contacts.results; + while(toRemove.length > 0) { + var contact = toRemove.shift(); + contact.remove(onSuccess, onFailure); + } + } catch(e) { + debugPrint("Error Occured in remove Contact: "+e.message); + } +} + +// Compass +var watchCompassId = null; + +function startWatchCompass() { + var options = { frequency: 3000 }; + var onSuccess = function(compass) { + var element = document.getElementById('compass'); + element.innerHTML = 'Compass X: ' + compass.x + '
' + + 'Compass Y: ' + compass.y + '
' + + 'Compass Z: ' + compass.z + '
' + + 'Timestamp: ' + compass.timestamp + '
'; + }; + + var onFail = function() { + debugPrint('Compass Error!'); + }; + watchCompassId = navigator.compass.watchHeading(onSuccess, onFail, options); +} + +function stopWatchCompass() { + try { + navigator.compass.clearWatch(watchCompassId); + watchCompassId= null; + } catch(e) { + debugPrint("stopWatchCompass: "+e.message); + } +} + +function getCurrentHeading() { + try { + var compass = document.getElementById('compass'); + var onSuccess = function(compass) { + var element = document.getElementById('compass'); + element.innerHTML = 'Compass X: ' + compass.x + '
' + + 'Compass Y: ' + compass.y + '
' + + 'Compass Z: ' + compass.z + '
' + + 'Timestamp: ' + compass.timestamp + '
'; + } + + var onFail = function() { + debugPrint('Compass Error!'); + } + compass.style.display = 'block'; + navigator.compass.getCurrentHeading(onSuccess, onFail, { frequency: 5000 }); + } catch(e) { + alert(e.message); + } +} + + +function toggleStartCompass(em) { + try { + var compass = document.getElementById('compass'); + if(em.value == "Compass.watchHeading") { + em.value = "Compass.clearWatch"; + compass.style.display = 'block'; + startWatchCompass(); + } else { + em.value = "Compass.watchHeading"; + compass.style.display = 'none'; + stopWatchCompass(); + } + } + catch(e) { + alert(e.message); + } +} + +// Notification + +function notificationAlert() { + var complete = function(button) { + debugPrint("Alert button clicked: "+button); + } + try { + navigator.notification.alert("This is an alert Dialog",complete, "Alert Title", "OK"); + } catch(e) { + debugPrint(e.message); + } +} + +function notificationConfirm() { + var complete = function(button) { + debugPrint("Alert button clicked: "+button); + } + try { + navigator.notification.confirm("This is an alert Dialog",complete, "Alert Title", "OK,Cancel"); + } catch(e) { + debugPrint(e.message); + } +} + +function notificationVibrate() { + try { + navigator.notification.vibrate(3000); + } catch(e) { + debugPrint(e.message); + } +} +function notificationBeep() { + try { + navigator.notification.beep(4); + } catch(e) { + debugPrint(e.message); + } +} + +// Camera + +function getPicture() { + try { + var successCallback = function(uri) { + var image = document.getElementById("picture"); + debugPrint(uri); + image.src = uri; + } + var errorCallback = function(message) { + debugPrint("Camera Failed: "+message); + } + navigator.camera.getPicture(successCallback, errorCallback, {}); + } catch(e) { + debugPring(e.message); + } +} http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/application.xml ---------------------------------------------------------------------- diff --git a/application.xml b/application.xml old mode 100755 new mode 100644 index 6637311..65695e7 --- a/application.xml +++ b/application.xml @@ -1,24 +1,45 @@ - - - Cordova - - Cordova - Cordova - - - - - Cordova.pngCordova.png - - - - - - Cordova_Splash.pngCordova_Splash.png - - - - - false - - + + + + + Cordova + + Cordova + Cordova + + + + + Cordova.pngCordova.png + + + + + + Cordova_Splash.pngCordova_Splash.png + + + + + false + + http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/inc/Cordova.h ---------------------------------------------------------------------- diff --git a/inc/Cordova.h b/inc/Cordova.h old mode 100755 new mode 100644 index 0c95c9f..1145ee8 --- a/inc/Cordova.h +++ b/inc/Cordova.h @@ -1,61 +1,82 @@ -#ifndef __CORDOVA_H__ -#define __CORDOVA_H__ - - -#include -#include -#include -#include - -/** - * [WebBasedApp] application must inherit from Application class - * which provides basic features necessary to define an application. - */ -class Cordova : - public Osp::App::Application, - public Osp::System::IScreenEventListener -{ -public: - - /** - * [Cordova] application must have a factory method that creates an instance of itself. - */ - static Osp::App::Application* CreateInstance(void); - - -public: - Cordova(); - ~Cordova(); - - -public: - - - // Called when the application is initializing. - bool OnAppInitializing(Osp::App::AppRegistry& appRegistry); - - // Called when the application is terminating. - bool OnAppTerminating(Osp::App::AppRegistry& appRegistry, bool forcedTermination = false); - - - // Called when the application's frame moves to the top of the screen. - void OnForeground(void); - - - // Called when this application's frame is moved from top of the screen to the background. - void OnBackground(void); - - // Called when the system memory is not sufficient to run the application any further. - void OnLowMemory(void); - - // Called when the battery level changes. - void OnBatteryLevelChanged(Osp::System::BatteryLevel batteryLevel); - - // Called when the screen turns on. - void OnScreenOn (void); - - // Called when the screen turns off. - void OnScreenOff (void); -}; - -#endif //__CORDOVA_H__ +/* + * + * 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. + * +*/ + +#ifndef __CORDOVA_H__ +#define __CORDOVA_H__ + + +#include +#include +#include +#include + +/** + * [WebBasedApp] application must inherit from Application class + * which provides basic features necessary to define an application. + */ +class Cordova : + public Osp::App::Application, + public Osp::System::IScreenEventListener +{ +public: + + /** + * [Cordova] application must have a factory method that creates an instance of itself. + */ + static Osp::App::Application* CreateInstance(void); + + +public: + Cordova(); + ~Cordova(); + + +public: + + + // Called when the application is initializing. + bool OnAppInitializing(Osp::App::AppRegistry& appRegistry); + + // Called when the application is terminating. + bool OnAppTerminating(Osp::App::AppRegistry& appRegistry, bool forcedTermination = false); + + + // Called when the application's frame moves to the top of the screen. + void OnForeground(void); + + + // Called when this application's frame is moved from top of the screen to the background. + void OnBackground(void); + + // Called when the system memory is not sufficient to run the application any further. + void OnLowMemory(void); + + // Called when the battery level changes. + void OnBatteryLevelChanged(Osp::System::BatteryLevel batteryLevel); + + // Called when the screen turns on. + void OnScreenOn (void); + + // Called when the screen turns off. + void OnScreenOff (void); +}; + +#endif //__CORDOVA_H__ http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/47b5bf39/manifest.xml ---------------------------------------------------------------------- diff --git a/manifest.xml b/manifest.xml old mode 100755 new mode 100644 index 5c064dc..6afecf0 --- a/manifest.xml +++ b/manifest.xml @@ -1,4 +1,25 @@ + + 5rb676500n 93BA6FAC43ED18005711B434DCFC713C @@ -37,4 +58,4 @@ Tilt Vibration-effects - \ No newline at end of file +