Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最後に、tcp (クライアントサーバー) ソケットを開くことに成功しました。
しかし、問題は、サーバーアプリと他のアプリを切り替えてから、サーバーアプリに戻ると、サーバーソケットが閉じていることがわかりました...!
サーバーソケットをスレッドで開いた。
私の問題は、「別のアプリに切り替えるときにスレッドを停止し、アプリに戻すときにスレッドを再起動する」ことにあると思います
注: 「onPuse または onStop」は実装しませんでした。