Class ZegoRangeSceneItemInternalImpl

    • Field Detail

      • mUIHandler

        public static android.os.Handler mUIHandler
    • Method Detail

      • setEventHandler

        public boolean setEventHandler​(IZegoRangeSceneItemEventHandler handler)
        Description copied from class: ZegoRangeSceneItem
        set range scene item event handler. Available since: 3.1.0 Description: Set the callback function of the range scene item module. When to call: After getting range scene item instance by [getRangeSceneItem].
        Specified by:
        setEventHandler in class ZegoRangeSceneItem
        Parameters:
        handler - The object used to receive range scene item callbacks.
        Returns:
        The result of set range scene item event handler, true: success, false: fail.
      • createItem

        public void createItem​(ZegoItemParam param,
                               IZegoRangeSceneCreateItemCallback callback)
        Description copied from class: ZegoRangeSceneItem
        Create item. Available: since 3.1.0 Description: Create item. Use cases: Item competition in the meta world. When to call: After receive login Scene success, before [logoutScene]. Caution: 1. Items belong to range scene, not a certain user. When a user successfully binds an item, it only means that the user has the temporary right to use the item. 2. An item is allowed to have one or more bound users, and the principle of first-come, first-served is followed when applying for bound items. 3. When multiple users bind an item at the same time, their changes to the item follow the cas principle. 4. When creating an item, it is allowed to specify whether to bind the item after the creation is successful. 5. When the item is created successfully, users within the range of the item will receive the [onItemEnterView] callback notification. Related APIs: Users can call [destroyItem] to destroy item.
        Specified by:
        createItem in class ZegoRangeSceneItem
        Parameters:
        param - Item param.
        callback - The callback of create item.
      • destroyItem

        public void destroyItem​(long itemID,
                                IZegoRangeSceneDestroyItemCallback callback)
        Description copied from class: ZegoRangeSceneItem
        Destroy item. Available: since 3.1.0 Description: Destroy item. Use cases: Item competition in the meta world. When to call: After receive after login Scene success , before [logoutScene]. Caution: When an item is destroyed, users within the range of the item will be notified by the [onItemLeaveView] callback. Related APIs: Users can call [createItem] to create item.
        Specified by:
        destroyItem in class ZegoRangeSceneItem
        Parameters:
        itemID - Item ID.
        callback - The callback of destroy item.
      • bindItem

        public void bindItem​(long itemID,
                             IZegoRangeSceneBindItemCallback callback)
        Description copied from class: ZegoRangeSceneItem
        Bind item. Available: since 3.1.0 Description: Bind item. Use cases: Item competition in the meta world. When to call: After receive after login Scene success, before [logoutScene]. Caution: When an item is successfully bound, users within the range of the item will be notified by the [onItemBindUpdate] callback. Related APIs: Users can call [unbindItem] to unbind item.
        Specified by:
        bindItem in class ZegoRangeSceneItem
        Parameters:
        itemID - Item ID.
        callback - The callback of bind item.
      • unbindItem

        public void unbindItem​(long itemID,
                               IZegoRangeSceneUnbindItemCallback callback)
        Description copied from class: ZegoRangeSceneItem
        Unbind item. Available: since 3.1.0 Description: Unbind item. Use cases: Item competition in the meta world. When to call: After receive [bindItem], before [logoutScene]. Caution: When an item is successfully unbound, users within the scope of the item will be notified by the [onItemUnbindUpdate] callback. Related APIs: Users can call [bindItem] to bind item.
        Specified by:
        unbindItem in class ZegoRangeSceneItem
        Parameters:
        itemID - Item ID.
        callback - The callback of unbind item.
      • updateItemStatus

        public void updateItemStatus​(long itemID,
                                     ZegoPosition position,
                                     int channel,
                                     byte[] status,
                                     IZegoRangeSceneUpdateItemStatusCallback callback)
        Description copied from class: ZegoRangeSceneItem
        Update item status. Available: since 3.1.0 Description: Developers can call this function to update the item status. When to call: After [onBindItem], before [unbindItem]. Restrictions: None. Caution: None.
        Specified by:
        updateItemStatus in class ZegoRangeSceneItem
        Parameters:
        itemID - Item ID.
        position - Item's current location.
        channel - The channel to which the status belongs, starting from 0, cannot exceed the maximum channel number.
        status - Current status data.
        callback - The callback of update item status.
      • updateItemCommand

        public void updateItemCommand​(long itemID,
                                      ZegoPosition position,
                                      int channel,
                                      byte[] command,
                                      IZegoRangeSceneUpdateItemCommandCallback callback)
        Description copied from class: ZegoRangeSceneItem
        Update item status. Available: since 3.1.0 Description: Developers can call this function to update the item command. When to call: After [onBindItem], before [unbindItem]. Restrictions: None. Caution: None.
        Specified by:
        updateItemCommand in class ZegoRangeSceneItem
        Parameters:
        itemID - Item ID.
        position - Item's current location.
        channel - The channel to which the status belongs, starting from 0, cannot exceed the maximum channel number.
        command - Next command data.
        callback - The callback of update item next command.