kai-morich / SimpleUsbTerminal

Android terminal app for devices with a serial / UART interface connected with a USB-to-serial-converter
MIT License
529 stars 195 forks source link

Start service from Activity #41

Closed bastianpedersen closed 3 years ago

bastianpedersen commented 3 years ago

Hi,

I am trying to start the service from an Activity, but OnServiceConnected never gets called. Any idea?

kai-morich commented 3 years ago

I start service: https://github.com/kai-morich/SimpleUsbTerminal/blob/37b86af66e785840f17218e2d0f37e24015b8d38/app/src/main/java/de/kai_morich/simple_usb_terminal/TerminalFragment.java#L107 and bind with class to be notified: https://github.com/kai-morich/SimpleUsbTerminal/blob/37b86af66e785840f17218e2d0f37e24015b8d38/app/src/main/java/de/kai_morich/simple_usb_terminal/TerminalFragment.java#L121