I just started doing some Android app development, and I decided I’m going to write an app to work with Google Calendar.
The first problem that came to me is that I can’t add any Gmail account on the emulator. When I go to settings -> accounts, I can only add an Exchange account.
This raises a question how should I develop such application. I know that I should mock the API while I’m running tests, but how am I supposed to run the app on the emulator?
Should I just test it on mocked API with JUnit and then run it on production phone?
As for the emulator set up for a Google account, well, it depends on the Android version you have in your AVD: for example for 2.2, go to Settings/Accounts & Sync, click on Add account and Google, etc.
As for the Google Calendar access, the best way is to use the Google Calendar API.
Please note: there is not yet an official Android SDK API for the Calendar access.