getRealTimeLocation

public abstract RealTimeLocationErrorCode getRealTimeLocation(ConversationType conversationType, String targetId)

Retrieves an instance of RealTimeLocation.

When used, each time you enter a conversation, retrieve the corresponding instance to determine whether the location sharing service is available or in progress. If the instance retrieval fails, an error code is returned, corresponding to specific failure information. If the retrieval is successful, the user can set up a listener and initiate location sharing. If the retrieval indicates that location sharing is already in progress, it means the other party has initiated location sharing, and the user can set up a listener to join. If other failure information is returned, the user can provide corresponding prompts based on this information.

Return

Whether the instance retrieval was successful. RealTimeLocationErrorCode.

Parameters

conversationType

The conversation type of the conversation where location sharing is initiated.

targetId

The conversation ID of the conversation where location sharing is initiated.