converts a string to a byte array
(text string)
| 106 | |
| 107 | // converts a string to a byte array |
| 108 | func text2byte(text string) []byte { |
| 109 | arr := []byte{} |
| 110 | for _, c := range text { |
| 111 | arr = append(arr, byte(int(c))) |
| 112 | } |
| 113 | return arr |
| 114 | } |
| 115 | |
| 116 | // send an intent to the android tv device |
| 117 | // can be used to start an app with a specific activity |