Instructions for the Picasa Web Albums Android Sample
Browse Online
Checkout Instructions
Prerequisites: install Java 6, Mercurial (requires 1.6 or
higher) and Maven
(requires 3.0 or higher). You may need to set your
JAVA_HOME
.
cd [someDirectory]
hg clone https://code.google.com/p/google-api-java-client.samples/ google-api-java-client-samples
cd google-api-java-client-samples/shared/gdata/shared-sample-gdata
mvn source:jar install
cd ../shared-sample-picasa
mvn source:jar install
Setup Project in Eclipse 3.7 (Indigo)
Prerequisites: install Eclipse,
the Mercurial plugin, the Maven plugin, and the Android
plugin.
- Preferences:
- Android: setup SDK location
- Window > Android SDK and AVD Manager
- Follow instructions to install Package "Google API's by Google
Inc., Android API 8"
- Follow instructions to create a new Android Virtual Device
based on target "Google API's (Google Inc.) - API Level 8"
- Click "Start..." (wait a while...)
- On home screen in emulator, click Menu button, Settings
- Click on "Accounts and Sync"
- Click on "Add Account"
- Click "Google" and follow instructions
- Import
picasa-android-sample project
- File > Import...
- Select "General > Existing Project into Workspace" and click
"Next"
- Click "Browse" next to "Select root directory", find
[someDirectory]/google-api-java-client-samples/picasa-android-sample
and click "Next"
- Click "Finish"
- Clean Project (if compile error about missing gen directory)
- Select
picasa-android-sample project
- Project > Clean...
- Select "Clean projects selected below"
- Click on "OK"
- Run
- Right-click on project picasa-android-sample
- Run As > Android Application
- On your device, click the Menu button to switch accounts or add
a new Album. Select and hold on an album to update or delete it.
- There is also a demo for uploading photos. After taking a
picture using your Android device, browse your pictures, then click on
"Share", click "Picasa Sample", and the photo will be uploaded to
Picasa Web Albums.
Setup Project with Maven
cd google-api-java-client-samples/picasa-android-sample
- Uncomment the dependency on android in
pom.xml
mvn install android:deploy android:run