Closed Rich2020 closed 3 years ago
Maybe you can start proxyee server on a new thread, unresponsive is because starting the service will block the UI thread.
@Rich2020 Calling the start()
method will block the main activity thread, which will lead to ANR. To solve this problem, you need to use service and start a separate thread to start the server.
In other words, the 'start()' method is a blocking method, which blocks the thread until the server stops.
Hi guys, thanks - I guess I assumed Proxee would start itself on a new thread and not be something I'd need to do.
Testing on a MacBook Pro, running macOS Catalina 10.15.6 (19G2021). Gradle project.
I created a default Android app, imported Proxee, and hit run. However, when I start Proxee, the app becomes unresponsive and then crashes after a while. There is no Logcat or terminal crash information.
I only created a single function
proxee()
in my test application, which is called when a button is pressed. I tried to intercept all traffic by modifying the Baidu URL in the example. I have also tried with the default port of 9999 as well as 8080. Here is the proxee function:Here is all the Logcat output: