You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/ndc.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,8 +109,35 @@ ENDCLASS.
109
109
```
110
110
111
111
#### Camera
112
-
For camera capabilities, refer to the addon section under [js-libraries.](/addons/ext_js)
112
+
For camera capabilities, refer to the sample `z2ui5_cl_sample_app_306`:
113
+
```abap
114
+
CLASS z2ui5_cl_demo_app_306 DEFINITION PUBLIC FINAL CREATE PUBLIC .
115
+
116
+
PUBLIC SECTION.
117
+
INTERFACES z2ui5_if_app.
118
+
DATA mv_picture_base TYPE string.
119
+
120
+
ENDCLASS.
121
+
122
+
CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION.
123
+
METHOD z2ui5_if_app~main.
113
124
125
+
IF client->check_on_init( ).
126
+
DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( 'abap2UI5 - Device Camera Picture'
127
+
)->_z2ui5( )->camera_picture(
128
+
value = client->_bind_edit( mv_picture_base )
129
+
onphoto = client->_event( 'CAPTURE' ) ).
130
+
client->view_display( page->stringify( ) ).
131
+
ENDIF.
132
+
133
+
IF client->get( )-event = `CAPTURE`.
134
+
"handle mv_picture_base
135
+
"...
136
+
ENDIF.
137
+
138
+
ENDMETHOD.
139
+
ENDCLASS.
140
+
```
114
141
115
142
::: tip **Browser Restrictions**
116
143
Depending on browser permissions and configuration settings, access to or use of native device capabilities (NDC) may be restricted. Watch out for any warning messages directly from your browser during testing.
0 commit comments