3

I know this seems like a duplicate question but I've read many of the others including Webservice credentials - OpenID/Android AccountManager?. Here's my situation:

I'm currently working on a project mainly for educational purposes and personal use. Its a Web application written in PHP that allows you to remotely manage your phone (silence, set an alarm, locate, ect.) What I would like to do is allow users to have accounts where their phone(s) is/are listed and managed without having to develop an entire Auth/User Managment system. I thought it would be easy to implement with AccountManager but I'm getting strange error like:

java.lang.IllegalStateException: calling this from your main thread can lead to deadlock

In anger and frustration, I've since deleted that code and so can't post what caused it. Without being able to tie phones to accounts, I have no way of managing the device remotely. One of the parts I'm confused with is how to use the authToken. I don't need to use any google services, I just want to know if it's a valid google account then store their Google email in a database on the server side.

If anyone could give me some example code or maybe a tutorial, that would be amazing. Also, if anyone thinks that I'm going about this the wrong way, please let me know.

P.S. I'm good at being vague and forgetting details so I apologize for any misunderstandings beforehand.

Daniel Nugent
  • 43,104
  • 15
  • 109
  • 137
Brandon
  • 4,486
  • 8
  • 33
  • 39

0 Answers0