-
Notifications
You must be signed in to change notification settings - Fork 1
/
invokeCamera.html
56 lines (52 loc) · 1.78 KB
/
invokeCamera.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Invoke Native Camera</title>
<link rel="stylesheet" href="css/BlackBerry-JQM-all.min.css" />
<script src="js/BlackBerry-JQM-all.min.js"></script>
<script src="local:///chrome/webworks.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
</head>
<body>
<div data-role="page">
<div data-role="header" data-position="fixed">
<h1>Invoke Native Camera</h1>
</div>
<div data-role="content">
<input type="button" id="invokeCamera" value="Invoke Camera" />
<input type="button" id="invokeCameraCard" value="Invoke Camera Card" />
<script type="text/javascript">
$('#invokeCamera').click(
function() {
// open web link in browser
blackberry.invoke.invoke({
target: "sys.camera.app",
uri: ""
}, onInvokeSuccess, onInvokeError);
});
function onInvokeSuccess() {
alert("Invocation successful!");
}
function onInvokeError(error) {
alert("Invocation failed, error: " + error);
}
$('#invokeCameraCard').click(
function() {
// open web link in browser
blackberry.invoke.invoke({
target: "sys.camera.card"
}, onInvokeSuccess, onInvokeError);
});
</script>
</div>
<!--/content-->
<div data-role="footer" data-position="fixed">
<div id="action-bar-area" data-role="actionbar">
<div data-role="back"></div>
</div>
</div>
</div>
</body>
</html>