Skip to content

QUESTION about API working with the Android client #18

@xvoland

Description

@xvoland

Thanks for your interesting project.

I was trying to figure out how your Windows client works (I’m not a C# developer), specifically how it controls the Android app over Wi-Fi — changing the resolution, switching the camera, and so on.

As far as I understand, it switches the app into some kind of simplified mode and then sends commands.

I noticed the following structures:

// PacketType.kt
enum class PacketType(val code: Byte) {
    HELLO(0x01),
    ACK(0x02),
    VIDEO(0x03),
    CONTROL(0x04),
    HEARTBEAT(0x05),
    DISCONNECT(0x06)
}
// ControlPacket.kt
enum class ControlPacket(val code: Byte) {
    SWITCH_CAMERA(0x01),
    TOGGLE_FLASH(0x02),
    SET_ZOOM(0x03)
}

How exactly are the TCP packets sent — what’s the algorithm and the sequence?

Could you help me by describing it step by step, for example:

Windows client → command: (1 byte)(1 byte) → Android

Command: c0

Thanks in advance for your reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions