However, of all the login mechanisms I found out, the only supported method for a desktop/mobile app is asking user to enter his/her username and password. Google supports OAuth, but only for web apps. I wish they implement version of OAuth for desktop/mobile apps, just like Twitter. Another way, is to get the login tokens from Android platform. Although, it should be available as platform API, it is not. I guess the reason is, it will be limited only to 'Google experience' phones, hence it cannot be part of the platform.
But, thanks to the article I mentioned above, more info came out on this discussion. From the article I learnt, that a Google Reader widget accesses Google Account info available on phone. I went through the comments, and one of them gave a pointer to how this might be done. After following the email thread, I found a way to do this. The solution is not perfect/ideal. It uses a library put together by a Google engineer (@jbqueru), but it is not an official part of platform. With the help of ubikdroid's example code from the thread, I put together an "AutoLogin" feature for ReaderScope (as of v1.2.1)
If you are using a 'Google Experience' phone (or a ROM with Google Apps), then you don't have to give your password to ReaderScope. Just press AutoLogin and you are in.
If the existing users want to remove their password (which by the way is encoded before storage) from ReaderScope and use this new auth mechanism, then you can do so without loosing your cached items. Go to Settings->Credentials Management. Press "Logout". Choose "No" to the prompt of deleting cache. The app will exit. Start it again, you will be taken to Login screen. Now choose AutoLogin.
If your phone is not 'Google Experience' phone, this will not work. You will get an error message.
I put this together in past few hours. Although it has passed my automated regression tests, there might be some rough edges. Let me know if you see any problems.
4 comments:
wont work on my HTC Magic with cyanogenmod 4.1.11.1
:(
ahhhh seems with got a pop under saying it cant use my Google Apps account ...
maybe thats why it didnt work.
Worked great for me! Thanks for being so responsive.
Excelent, works just perfect.
Post a Comment