Skip to content

Types of .present method are misleading - Different behavior between Android and IOS #111

@gitChaoslord

Description

@gitChaoslord

Hello Zoho Dev team,

As mentioned in the title, I've encountered a few inconsistencies while using the present method of the SalesIQ SDK.

Description

I intended to call the present method of the SDK to open the Conversations tab without navigating to an already active session. Alas, I've realised it is not possible using this method. Regardless, here are a few issues I've noticed.

Types and method invocation

According to the types provided in the SDK the present method receives the following arguments

tab?: string | null
id?: string | null
callback?: (error: CallbackError, result: boolean) => void
ZohoSalesIQ.present(ZohoSalesIQ.Tab.CONVERSATIONS, null, (error, result) => {
 console.log({error, result})
})

Issues encountered

If id has a value of null or undefined

  • [Android] the callback never fires but the tab is opened
  • [IOS] the callback fires and the tab is opened

If id is an empty string ''

  • [Android] the callback fires and you receive an error code ( 700 with a message "Invalid ChatID" )
  • [IOS] the callback fires, you do not receive an error code and the tab is opened

When the callback fires

  • [Android] result is a boolean
  • [IOS] result is a boolean inside an array, e.g. [true]

Environment

React-native: 0.74.5
react-native-zohosalesiq-mobilisten: 10.0.3

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions