Permalink
Browse files

updating repository with cordovajs

  • Loading branch information...
imhotep committed Apr 27, 2012
1 parent cb95549 commit 3057bbd16bf2a7e36cd2e5b3db460cde44700bb9
Showing with 4,330 additions and 29 deletions.
  1. +8 −2 Res/index.html
  2. +0 −26 Res/js/camera.js
  3. +4,308 −0 Res/js/cordova.bada.js
  4. +14 −1 Res/js/sample.js
View
@@ -5,6 +5,7 @@
<meta name="viewport" content="target-densitydpi=high-dpi, user-scalable=no" />
<title>Cordova Sample</title>
<link href="osp://webapp/css/style.css" rel="stylesheet" type="text/css" />
+<script type="text/javascript" src="./js/cordova.bada.js"></script>
<style type="text/css">
button.btn {
color:#050;
@@ -46,6 +47,11 @@
</head>
<body>
<ul>
+ <li>
+ <h3>Device</h3>
+ <div><button type="button" class="btn" onclick="setDeviceInfo()">DeviceInfo</button></div>
+ <span id="device"></span>
+ </li>
<li>
<h3>Acceleration</h3>
<div>
@@ -126,12 +132,12 @@ <h3>Camera</h3>
<div id="preview"></div>
</li>
</ul>
-<script type="text/javascript" src="./js/capture.js"></script>
+<!--<script type="text/javascript" src="./js/capture.js"></script>
<script type="text/javascript" src="./js/notification.js"></script>
<script type="text/javascript" src="./js/connection.js"></script>
<script type="text/javascript" src="./js/accelerometer.js"></script>
<script type="text/javascript" src="./js/compass.js"></script>
-<script type="text/javascript" src="./js/device.js"></script>
+<script type="text/javascript" src="./js/device.js"></script>-->
<script type="text/javascript" src="./js/sample.js"></script>
</body>
</html>
View
@@ -1,26 +0,0 @@
-navigator.camera = {
- getPicture: function(cameraSuccess, cameraFailure, cameraOptions) {
- // TODO
- },
- getPreview: function() {
- var onCreatePreviewNodeSuccess = function(previewObject) {
- var previewDiv = document.getElementById("preview");
- previewId = previewObject.id;
- previewDiv.appendChild(previewObject);
- previewObject.style.visibility = "visible";
- };
- var error = function(e) {
- alert("An error occured: " + e.message);
- };
-
- var success = function(cams) {
- if (cams.length > 0) {
- mainCamera = cams[0];
- mainCamera.createPreviewNode(onCreatePreviewNodeSuccess, error);
- return;
- }
- alert("Sorry, no cameras available.");
- };
- deviceapis.camera.getCameras(success, error);
- }
-}
Oops, something went wrong.

0 comments on commit 3057bbd

Please sign in to comment.