/
CameraManager+AvailabilityCallback.xml
502 lines (490 loc) · 36 KB
/
CameraManager+AvailabilityCallback.xml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
<Type Name="CameraManager+AvailabilityCallback" FullName="Android.Hardware.Camera2.CameraManager+AvailabilityCallback">
<TypeSignature Language="C#" Value="public abstract class CameraManager.AvailabilityCallback : Java.Lang.Object" />
<TypeSignature Language="ILAsm" Value=".class nested public auto ansi abstract beforefieldinit CameraManager/AvailabilityCallback extends Java.Lang.Object" />
<TypeSignature Language="DocId" Value="T:Android.Hardware.Camera2.CameraManager.AvailabilityCallback" />
<TypeSignature Language="F#" Value="type CameraManager.AvailabilityCallback = class
 inherit Object" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Java.Lang.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("android/hardware/camera2/CameraManager$AvailabilityCallback", DoNotGenerateAcw=true)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("android/hardware/camera2/CameraManager$AvailabilityCallback", DoNotGenerateAcw=true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>A callback for camera devices becoming available or unavailable to open.</summary>
<remarks>
<para>A callback for camera devices becoming available or unavailable to open.</para>
<para>Cameras become available when they are no longer in use, or when a new
removable camera is connected. They become unavailable when some
application or service starts using a camera, or when a removable camera
is disconnected.</para>
<para>Extend this callback and pass an instance of the subclass to
<c>CameraManager#registerAvailabilityCallback</c> to be notified of such availability
changes.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback" title="Reference documentation">Java documentation for <code>android.hardware.camera2.CameraManager.AvailabilityCallback</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AvailabilityCallback ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register(".ctor", "()V", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register(".ctor", "()V", "")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected AvailabilityCallback (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(native int javaReference, valuetype Android.Runtime.JniHandleOwnership transfer) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.#ctor(System.IntPtr,Android.Runtime.JniHandleOwnership)" />
<MemberSignature Language="F#" Value="new Android.Hardware.Camera2.CameraManager.AvailabilityCallback : nativeint * Android.Runtime.JniHandleOwnership -> Android.Hardware.Camera2.CameraManager.AvailabilityCallback" Usage="new Android.Hardware.Camera2.CameraManager.AvailabilityCallback (javaReference, transfer)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="javaReference" Type="System.IntPtr" />
<Parameter Name="transfer" Type="Android.Runtime.JniHandleOwnership" />
</Parameters>
<Docs>
<param name="javaReference">To be added.</param>
<param name="transfer">To be added.</param>
<summary>To be added.</summary>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="JniPeerMembers">
<MemberSignature Language="C#" Value="public override Java.Interop.JniPeerMembers JniPeerMembers { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Java.Interop.JniPeerMembers JniPeerMembers" />
<MemberSignature Language="DocId" Value="P:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.JniPeerMembers" />
<MemberSignature Language="F#" Value="member this.JniPeerMembers : Java.Interop.JniPeerMembers" Usage="Android.Hardware.Camera2.CameraManager.AvailabilityCallback.JniPeerMembers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Interop.JniPeerMembers</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="OnCameraAccessPrioritiesChanged">
<MemberSignature Language="C#" Value="public virtual void OnCameraAccessPrioritiesChanged ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void OnCameraAccessPrioritiesChanged() cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.OnCameraAccessPrioritiesChanged" />
<MemberSignature Language="F#" Value="abstract member OnCameraAccessPrioritiesChanged : unit -> unit
override this.OnCameraAccessPrioritiesChanged : unit -> unit" Usage="availabilityCallback.OnCameraAccessPrioritiesChanged " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("onCameraAccessPrioritiesChanged", "()V", "GetOnCameraAccessPrioritiesChangedHandler", ApiSince=29)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("onCameraAccessPrioritiesChanged", "()V", "GetOnCameraAccessPrioritiesChangedHandler", ApiSince=29)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android29.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android29.0")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Called whenever camera access priorities change.</summary>
<remarks>
<para>Called whenever camera access priorities change.</para>
<para>Notification that camera access priorities have changed and the camera may
now be openable. An application that was previously denied camera access due to
a higher-priority user already using the camera, or that was disconnected from an
active camera session due to a higher-priority user trying to open the camera,
should try to open the camera again if it still wants to use it. Note that
multiple applications may receive this callback at the same time, and only one of
them will succeed in opening the camera in practice, depending on exact access
priority levels and timing. This method is useful in cases where multiple
applications may be in the resumed state at the same time, and the user switches
focus between them, or if the current camera-using application moves between
full-screen and Picture-in-Picture (PiP) states. In such cases, the camera
available/unavailable callbacks will not be invoked, but another application may
now have higher priority for camera access than the current camera-using
application.</para>
<para>The default implementation of this method does nothing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraAccessPrioritiesChanged()" title="Reference documentation">Java documentation for <code>android.hardware.camera2.CameraManager.AvailabilityCallback.onCameraAccessPrioritiesChanged()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="OnCameraAvailable">
<MemberSignature Language="C#" Value="public virtual void OnCameraAvailable (string cameraId);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void OnCameraAvailable(string cameraId) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.OnCameraAvailable(System.String)" />
<MemberSignature Language="F#" Value="abstract member OnCameraAvailable : string -> unit
override this.OnCameraAvailable : string -> unit" Usage="availabilityCallback.OnCameraAvailable cameraId" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("onCameraAvailable", "(Ljava/lang/String;)V", "GetOnCameraAvailable_Ljava_lang_String_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("onCameraAvailable", "(Ljava/lang/String;)V", "GetOnCameraAvailable_Ljava_lang_String_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cameraId" Type="System.String" />
</Parameters>
<Docs>
<param name="cameraId">The unique identifier of the new camera.</param>
<summary>A new camera has become available to use.</summary>
<remarks>
<para>A new camera has become available to use.</para>
<para>The default implementation of this method does nothing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraAvailable(java.lang.String)" title="Reference documentation">Java documentation for <code>android.hardware.camera2.CameraManager.AvailabilityCallback.onCameraAvailable(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="OnCameraUnavailable">
<MemberSignature Language="C#" Value="public virtual void OnCameraUnavailable (string cameraId);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void OnCameraUnavailable(string cameraId) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.OnCameraUnavailable(System.String)" />
<MemberSignature Language="F#" Value="abstract member OnCameraUnavailable : string -> unit
override this.OnCameraUnavailable : string -> unit" Usage="availabilityCallback.OnCameraUnavailable cameraId" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("onCameraUnavailable", "(Ljava/lang/String;)V", "GetOnCameraUnavailable_Ljava_lang_String_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("onCameraUnavailable", "(Ljava/lang/String;)V", "GetOnCameraUnavailable_Ljava_lang_String_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cameraId" Type="System.String" />
</Parameters>
<Docs>
<param name="cameraId">The unique identifier of the disconnected camera.</param>
<summary>A previously-available camera has become unavailable for use.</summary>
<remarks>
<para>A previously-available camera has become unavailable for use.</para>
<para>If an application had an active CameraDevice instance for the
now-disconnected camera, that application will receive a
<c>CameraDevice.StateCallback#onDisconnected disconnection error</c>.</para>
<para>The default implementation of this method does nothing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraUnavailable(java.lang.String)" title="Reference documentation">Java documentation for <code>android.hardware.camera2.CameraManager.AvailabilityCallback.onCameraUnavailable(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="OnPhysicalCameraAvailable">
<MemberSignature Language="C#" Value="public virtual void OnPhysicalCameraAvailable (string cameraId, string physicalCameraId);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void OnPhysicalCameraAvailable(string cameraId, string physicalCameraId) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.OnPhysicalCameraAvailable(System.String,System.String)" />
<MemberSignature Language="F#" Value="abstract member OnPhysicalCameraAvailable : string * string -> unit
override this.OnPhysicalCameraAvailable : string * string -> unit" Usage="availabilityCallback.OnPhysicalCameraAvailable (cameraId, physicalCameraId)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("onPhysicalCameraAvailable", "(Ljava/lang/String;Ljava/lang/String;)V", "GetOnPhysicalCameraAvailable_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("onPhysicalCameraAvailable", "(Ljava/lang/String;Ljava/lang/String;)V", "GetOnPhysicalCameraAvailable_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android30.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android30.0")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cameraId" Type="System.String" />
<Parameter Name="physicalCameraId" Type="System.String" />
</Parameters>
<Docs>
<param name="cameraId">The unique identifier of the logical multi-camera.</param>
<param name="physicalCameraId">The unique identifier of the physical camera.</param>
<summary>A physical camera has become available for use again.</summary>
<remarks>
<para>A physical camera has become available for use again.</para>
<para>By default, all of the physical cameras of a logical multi-camera are
available, so <c>#onPhysicalCameraAvailable</c> is not called for any of the physical
cameras of a logical multi-camera, when <c>#onCameraAvailable</c> for the logical
multi-camera is invoked. However, if some specific physical cameras are unavailable
to begin with, <c>#onPhysicalCameraUnavailable</c> may be invoked after
<c>#onCameraAvailable</c>.</para>
<para>If <c>android.content.pm.ApplicationInfo#targetSdkVersion targetSdkVersion</c>
&lt; <c>android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE</c>, opening a logical camera
disables the <c>#onPhysicalCameraAvailable</c> and <c>#onPhysicalCameraUnavailable</c>
callbacks for its physical cameras. For example, if app A opens the camera device:</para>
<para><ul>
<li>All apps subscribing to ActivityCallback get <c>#onCameraUnavailable</c>.</li>
<li>No app (including app A) subscribing to ActivityCallback gets
<c>#onPhysicalCameraAvailable</c> or <c>#onPhysicalCameraUnavailable</c>, because
the logical camera is unavailable (some app is using it).</li>
</ul></para>
<para>If <c>android.content.pm.ApplicationInfo#targetSdkVersion targetSdkVersion</c>
&ge; <c>android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE</c>:</para>
<para><ul>
<li>A physical camera status change will trigger <c>#onPhysicalCameraAvailable</c>
or <c>#onPhysicalCameraUnavailable</c> even after the logical camera becomes
unavailable. A <c>#onCameraUnavailable</c> call for a logical camera doesn't reset the
physical cameras' availability status. This makes it possible for an application opening
the logical camera device to know which physical camera becomes unavailable or available
to use.</li>
<li>Similar to <c>android.os.Build.VERSION_CODES#TIRAMISU Android 13</c> and earlier,
the logical camera's <c>#onCameraAvailable</c> callback implies all of its physical
cameras' status become available. <c>#onPhysicalCameraUnavailable</c> will be called
for any unavailable physical cameras upon the logical camera becoming available.</li>
</ul></para>
<para>Given the pipeline nature of the camera capture through <c>android.hardware.camera2.CaptureRequest</c>, there may be frame drops if the application
requests images from a physical camera of a logical multi-camera and that physical camera
becomes unavailable. The application should stop requesting directly from an unavailable
physical camera as soon as <c>#onPhysicalCameraUnavailable</c> is received, and also be
ready to robustly handle frame drop errors for requests targeting physical cameras,
since those errors may arrive before the unavailability callback.</para>
<para>The default implementation of this method does nothing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onPhysicalCameraAvailable(java.lang.String,%20java.lang.String)" title="Reference documentation">Java documentation for <code>android.hardware.camera2.CameraManager.AvailabilityCallback.onPhysicalCameraAvailable(java.lang.String, java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="OnPhysicalCameraUnavailable">
<MemberSignature Language="C#" Value="public virtual void OnPhysicalCameraUnavailable (string cameraId, string physicalCameraId);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void OnPhysicalCameraUnavailable(string cameraId, string physicalCameraId) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.OnPhysicalCameraUnavailable(System.String,System.String)" />
<MemberSignature Language="F#" Value="abstract member OnPhysicalCameraUnavailable : string * string -> unit
override this.OnPhysicalCameraUnavailable : string * string -> unit" Usage="availabilityCallback.OnPhysicalCameraUnavailable (cameraId, physicalCameraId)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("onPhysicalCameraUnavailable", "(Ljava/lang/String;Ljava/lang/String;)V", "GetOnPhysicalCameraUnavailable_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("onPhysicalCameraUnavailable", "(Ljava/lang/String;Ljava/lang/String;)V", "GetOnPhysicalCameraUnavailable_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=30)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android30.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android30.0")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cameraId" Type="System.String" />
<Parameter Name="physicalCameraId" Type="System.String" />
</Parameters>
<Docs>
<param name="cameraId">The unique identifier of the logical multi-camera.</param>
<param name="physicalCameraId">The unique identifier of the physical camera.</param>
<summary>A previously-available physical camera has become unavailable for use.</summary>
<remarks>
<para>A previously-available physical camera has become unavailable for use.</para>
<para>By default, all of the physical cameras of a logical multi-camera are
unavailable if the logical camera itself is unavailable.
No availability callbacks will be called for any of the physical
cameras of its parent logical multi-camera, when <c>#onCameraUnavailable</c> for
the logical multi-camera is invoked.</para>
<para>If <c>android.content.pm.ApplicationInfo#targetSdkVersion targetSdkVersion</c>
&lt; <c>android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE</c>, opening a logical camera
disables the <c>#onPhysicalCameraAvailable</c> and <c>#onPhysicalCameraUnavailable</c>
callbacks for its physical cameras. For example, if app A opens the camera device:</para>
<para><ul>
<li>All apps subscribing to ActivityCallback get <c>#onCameraUnavailable</c>.</li>
<li>No app (including app A) subscribing to ActivityCallback gets
<c>#onPhysicalCameraAvailable</c> or <c>#onPhysicalCameraUnavailable</c>, because
the logical camera is unavailable (some app is using it).</li>
</ul></para>
<para>If <c>android.content.pm.ApplicationInfo#targetSdkVersion targetSdkVersion</c>
&ge; <c>android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE</c>:</para>
<para><ul>
<li>A physical camera status change will trigger <c>#onPhysicalCameraAvailable</c>
or <c>#onPhysicalCameraUnavailable</c> even after the logical camera becomes
unavailable. A <c>#onCameraUnavailable</c> call for a logical camera doesn't reset the
physical cameras' availability status. This makes it possible for an application opening
the logical camera device to know which physical camera becomes unavailable or available
to use.</li>
<li>Similar to <c>android.os.Build.VERSION_CODES#TIRAMISU Android 13</c> and earlier,
the logical camera's <c>#onCameraAvailable</c> callback implies all of its physical
cameras' status become available. <c>#onPhysicalCameraUnavailable</c> will be called
for any unavailable physical cameras upon the logical camera becoming available.</li>
</ul></para>
<para>Given the pipeline nature of the camera capture through <c>android.hardware.camera2.CaptureRequest</c>, there may be frame drops if the application
requests images from a physical camera of a logical multi-camera and that physical camera
becomes unavailable. The application should stop requesting directly from an unavailable
physical camera as soon as <c>#onPhysicalCameraUnavailable</c> is received, and also be
ready to robustly handle frame drop errors for requests targeting physical cameras,
since those errors may arrive before the unavailability callback.</para>
<para>The default implementation of this method does nothing.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onPhysicalCameraUnavailable(java.lang.String,%20java.lang.String)" title="Reference documentation">Java documentation for <code>android.hardware.camera2.CameraManager.AvailabilityCallback.onPhysicalCameraUnavailable(java.lang.String, java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="ThresholdClass">
<MemberSignature Language="C#" Value="protected override IntPtr ThresholdClass { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int ThresholdClass" />
<MemberSignature Language="DocId" Value="P:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.ThresholdClass" />
<MemberSignature Language="F#" Value="member this.ThresholdClass : nativeint" Usage="Android.Hardware.Camera2.CameraManager.AvailabilityCallback.ThresholdClass" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="ThresholdType">
<MemberSignature Language="C#" Value="protected override Type ThresholdType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type ThresholdType" />
<MemberSignature Language="DocId" Value="P:Android.Hardware.Camera2.CameraManager.AvailabilityCallback.ThresholdType" />
<MemberSignature Language="F#" Value="member this.ThresholdType : Type" Usage="Android.Hardware.Camera2.CameraManager.AvailabilityCallback.ThresholdType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
</Members>
</Type>