I would like to begin in the problem I encountered this morning.
The bug occurred when I was connection network in Android. I was confused at that time, because I have tried that code in Android in another project and it could work without any bug, however when I moved this code to this project it told me wrong.
I tried to find answers in the internet, nonetheless almost nobody could give a solution but just complaint their questions and begging answers. As a result, I thought I should give up finding help from internet and I tried to use Logcat to detect errors.
Finally, I found that the error was no considering exception of null pointer when I used String to get value. Consequently, I add the code of throwing exception, and the error disappeared.
Another finding was that when trying to compare two strings in Java, writing the code str1==str2 could not work, instead, it should use the function of string just lke str1.equal(str2). This finding is basically.