MCPcopy Create free account
hub / github.com/drosoCode/atvremote / sendConfiguration

Method sendConfiguration

pkg/v2/command/command.go:221–248  ·  view source on GitHub ↗

send a configuration message to the android tv device

()

Source from the content-addressed store, hash-verified

219
220// send a configuration message to the android tv device
221func (c *Command) sendConfiguration() error {
222 err := c.write(pb.RemoteMessage{
223 RemoteConfigure: &pb.RemoteConfigure{
224 Code1: 622,
225 DeviceInfo: &pb.RemoteDeviceInfo{
226 Model: "androidtvremote",
227 Vendor: "drosocode",
228 Unknown1: 1,
229 Unknown2: "1",
230 PackageName: "androitv-remote",
231 AppVersion: "1.0.0",
232 },
233 },
234 })
235 if err != nil {
236 return err
237 }
238 err = c.write(pb.RemoteMessage{
239 RemoteSetActive: &pb.RemoteSetActive{
240 Active: 622,
241 },
242 })
243 if err != nil {
244 return err
245 }
246
247 return nil
248}
249
250// emulate a key press on the android tv device
251func (c *Command) SendKey(keycode common.RemoteKeyCode) error {

Callers 2

ConnectMethod · 0.95
GetDataMethod · 0.95

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected