odyshewroman / AndroidTVRemoteControl

MIT License
31 stars 9 forks source link

Feature Support: Text Input from iDevice to TV #3

Open thachonline opened 1 year ago

thachonline commented 1 year ago

Description: The addition of a feature that allows users to send text input from their iOS device (iDevice) to the TV. This would be a valuable addition to the project as it enhances user interaction and convenience.

Details:

Benefits:

Thank you for considering this enhancement to the project.

thachonline commented 1 year ago

Sony Bravia also runs on Android TV (aka Google TV). These are the technical specifications of Sony, I'm not sure if there are any differences with Android TV.

https://pro-bravia.sony.net/develop/integrate/rest-api/spec/service/appcontrol/v1_0/setTextForm/index.html

odyshewroman commented 1 year ago

I handle the technical aspects of connecting and pairing with Android TV OS devices because it's not a trivial task. I also provide functions for sending any data to a remote device. So you can choose which data to send, implement it in your high-level business rules, then at the transport layer, convert it to the necessary format. You can use protocols like Protocol Buffers (protobuf) or manual encoding to send the data.

Sending specific commands might be a simpler task, and I may implement that in the future. However, currently, I don't have the time.

Yes, not only SONY, but also some other TV brands use Android TV OS, so it's not surprising. Therefore, my library is also applicable for them.

thachonline commented 1 year ago

Do you have specification documentation related to sending data to support Text Input? I want to implement this function in your project, but I can't find any documentation about the implementation of that function.

odyshewroman commented 1 year ago

What do you mean about Text Input? Which Text Input? There is documentation about key events that you can send to Android TV OS device - https://developer.android.com/reference/android/view/KeyEvent Today I have implemented entities for this events, and Deep Link

thachonline commented 1 year ago

On the current Android (Google) TV remote control app, you can indeed use it to input text into Android TV. For example, when opening a browser on your Android TV, instead of using the TV's virtual keyboard, you can use your smartphone to input text directly. Therefore, I'm wondering if there's a way to do this directly on AndroidTVRemoteControl?

odyshewroman commented 1 year ago

Hmm.. Should to investegate... I have never used Android (Google) TV remote control app, so I don't familiar with this feature. But, could it be just sequential sending of key codes to Android TV corresponding to user input characters?

thachonline commented 1 year ago

I think this feature, instead of sending individual bytes according to key codes, would send a byte array containing a list of characters or a Base64-encoded representation of the text that the user has entered to the TV. This could make the data transmission process more efficient and reduce the number of transmissions from the remote control app to the TV.

For example, in the case of Samsung TV, it would look like this:

//Remote
 export function getCommandByKey(key: KEYS): Command {
   return {
     method: 'ms.remote.control',
     params: {
       Cmd: 'Click',
       DataOfCmd: key,
       Option: 'false',
       TypeOfRemote: 'SendRemoteKey',
     },
   }
 }

 //Send text
 export function getSendTextCommand(text: any) {
   return {
     method: 'ms.remote.control',
     params: {
       Cmd: base64(text),
       DataOfCmd: 'base64',
       TypeOfRemote: 'SendInputString',
     },
   }
 }
odyshewroman commented 9 months ago

@thachonline message me on email - odyshewroman@gmail.com I have some updates about this feature

HarshadTechmero commented 6 months ago

@odyshewroman @thachonline is there any update for sending text to Android TV?

odyshewroman commented 6 months ago

To be honest I have some solution, but I don't plan to release it cause of some private reasons

HarshadTechmero commented 6 months ago

To be honest I have some solution, but I don't plan to release it cause of some private reasons

@odyshewroman have you any idea about send text RequestDataProtocol Data, Actually we are stuck on keyboard input to Smart TV so.

Sakurathanh2003 commented 5 months ago

who did find resolution? :<

HarshadTechmero commented 5 months ago

who did find resolution? :<

No from myend

Sakurathanh2003 commented 5 months ago

@HarshadTechmero Do you have any SDK that supports this?

HarshadTechmero commented 5 months ago

@HarshadTechmero Do you have any SDK that supports this?

No, i don't have, let me if you find anything for text input.

Do you have knowledge of Screen Mirroring? @Sakurathanh2003

Sakurathanh2003 commented 5 months ago

@HarshadTechmero I don't :<