Platforms to show: All Mac Windows Linux Cross-Platform

ContinuityCameraMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Continuity Camera MBS MacExtras Plugin 19.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The class to work with Continuity feature in MacOS Mojave.
Example
// This example needs a window with Canvas1.
// take a photo with the iPhone and show it in a canvas (Continuity Camera)
// MyContinuityCamera is a subclass of ContinuityCameraMBS with the Received event implemented.
// Camera is a property of the window: Camera As MyContinuityCamera
Camera = New MyContinuityCamera
Camera.Import(ContinuityCameraMBS.kIndexTakePhoto, Canvas1)

// in MyContinuityCamera:
Sub Received(Data As MemoryBlock, type As String) Handles Received
// Data is the image file data, type the UTI, e.g. public.jpeg
Var pic As Picture = Picture.FromData(Data)
System.DebugLog "Received " + type + ", " + pic.Width.ToString + " x " + pic.Height.ToString
End Sub

Works also with services to receive e.g. screenshot for older versions.

See also VNDocumentCameraViewControllerMBS for iOS.

Index Values

Constant Value Description
kIndexDrawSketch 2 Draw a sketch.
kIndexScanDocument 1 Scan a document as PDF.
kIndexTakePhoto 0 Take a picture.

This class has no subclasses.

Blog Entries

Xojo Developer Magazine

Videos

Release notes

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS MacExtras Plugin.


ContainerControl   -   Control


The biggest plugin in space...