Lost in Code
Gosh, got lost in code. After successfully authenticate my web api, I tried to get my android client to connect to my api. While on android, I revisit my AuthenticatorService.
My AuthenticatorService didn't validate username and password, so I tried to debug it. But because I thought I cannot debug a service started from android account settings, so I moved my AuthenticatorActivity as launcher activity so it can run on start. Then I debug it, but I got an InvalidArgumentException that caused by a null value in my accountType variable. I have no idea why it got null value and I also have no idea how to set the value.
Puzzled for hours then I stumbled to an article that point to Authenticator.xml. From that I understand that the accountType variable is preset in that xml file. So basically that error happened because I moved my AuthenticatorActivity called from launcher. It won't get null value if it started from android account settings. Damn stupid mistake cost me hours of my precious time.
Well, this is what happened if you learn everything by yourself.
(!! - -)
Gonna get sleep now..

















