How to disable annotation selection?

Product:
PDFtron SDK
Product Version:
9.2.3
Please give a brief summary of your issue:
(Think of this as an email subject)
I have a use case of just viewing a document with annotation in it. We would like to disable any of annotation selection. How do i restrict the user to select any of the annotation added ?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Sample code available from IOS. Can you please help us to find the same for android ?

func toolManager(_ toolManager: PTToolManager,
           shouldSelectAnnotation annotation: PTAnnot,
           onPageNumber pageNumber: UInt) -> Bool {
    return false
  }

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

Could you clarify what you mean by disabling the selection and provide a high-level use case? What issue do you want to solve by disabling annotation selection?

From the video it seems to not show the selected outline but still shows the contextual menu.

Thanks
Andrew

I have a use case of just view a document with added ‘ANNOTATION’, and edit a document which already has an ‘ANNOTATION’ added. So user must only be allowed to select/view contextual menu etc. only in EDIT mode not in VIEW mode.

Similar use case is handled by IOS sdk, and here is the code they have used. Kindly help to resolve the same in ANDROID sdk too.

func toolManager(_ toolManager: PTToolManager,
           shouldSelectAnnotation annotation: PTAnnot,
           onPageNumber pageNumber: UInt) -> Bool {
    return false
  }

Hi,

It is possible to disable annotation editing using the tool manager builder disableAnnotEditing.

This function takes an array of annotation types you would like to disable, for example, a typical use case for this is to disable annotation editing but keep form filling.

Please see sample Java code below:

        ToolManagerBuilder builder = ToolManagerBuilder.from()
                .disableAnnotEditing(new int[]{
                        Annot.e_Ink
                })

Best,
Eamon