Share via


PrinterDiscoverySession.OnStartPrinterDiscovery Method

Definition

Callback asking you to start printer discovery.

[Android.Runtime.Register("onStartPrinterDiscovery", "(Ljava/util/List;)V", "GetOnStartPrinterDiscovery_Ljava_util_List_Handler")]
public abstract void OnStartPrinterDiscovery (System.Collections.Generic.IList<Android.Print.PrinterId> priorityList);
[<Android.Runtime.Register("onStartPrinterDiscovery", "(Ljava/util/List;)V", "GetOnStartPrinterDiscovery_Ljava_util_List_Handler")>]
abstract member OnStartPrinterDiscovery : System.Collections.Generic.IList<Android.Print.PrinterId> -> unit

Parameters

priorityList
IList<PrinterId>

The list of printers to validate first. Never null.

Attributes

Remarks

Callback asking you to start printer discovery. Discovered printers should be added via calling #addPrinters(List). Added printers that disappeared should be removed via calling #removePrinters(List). Added printers whose properties or capabilities changed should be updated via calling #addPrinters(List). You will receive a call to #onStopPrinterDiscovery() when you should stop printer discovery.

During the lifetime of this session all printers that are known to your print service have to be added. The system does not retain any printers across sessions. However, if you were asked to start and then stop performing printer discovery in this session, then a subsequent discovering should not re-discover already discovered printers. You can get the printers reported during this session by calling #getPrinters().

<strong>Note: </strong>You are also given a list of printers whose availability has to be checked first. For example, these printers could be the user's favorite ones, therefore they have to be verified first. You do <strong>not need</strong> to provide the capabilities of the printers, rather verify whether they exist similarly to #onValidatePrinters(List).

Java documentation for android.printservice.PrinterDiscoverySession.onStartPrinterDiscovery(java.util.List<android.print.PrinterId>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to