Here is the java code that i am using:

PicasawebService myService = new PicasawebService("my app name");
                try {
                        myService.setUserCredentials("username",
                                        "password");

                        URL feedUrl;

                        feedUrl = new URL(
                                        
"https://picasaweb.google.com/data/feed/api/user/username/albumid/
albumid");

                        AlbumFeed feed = myService.getFeed(feedUrl, 
AlbumFeed.class);

                        for (PhotoEntry photo : feed.getPhotoEntries()) {
                                Log.d("", "getTitle: " + 
photo.getTitle().getPlainText());
                                Log.d("", "getMediaThumbnails: "
                                                + 
photo.getMediaThumbnails().get(0).getUrl());
                        }
                } catch (MalformedURLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (AuthenticationException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (ServiceException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

On Nov 3, 12:34 pm, mudit <[email protected]> wrote:
> Hi All,
>
> I want to show the picasa album of a user in my android app. I have
> the username/ password + album id of the album. I have tried
> implementing via using gdata library. But i am getting a VerifyError
> Exception as soon as i run my code.
>
> Following are the gdata libraries that i included in my project:
>
> 1) activation.jar
> 2) gdata-client-1.0.jar
> 3) gdata-core-1.0.jar
> 4) gdata-client-meta-1.0.jar
> 5) gdata-media-1.0.jar
> 6) gdata-photos-2.0.jar
> 7) google-collect-1.0-rc1.jar
> 8) servlet-api.jar.
>
> I am using eclipse 3.4.2 and Google API's[Android 2.2].
>
> I am getting following exception:
>
> 11-03 12:00:16.603: WARN/dalvikvm(1702): Unable to resolve superclass
> of Lcom/google/gdata/data/media/MediaMultipart; (1746)
> 11-03 12:00:16.613: WARN/dalvikvm(1702): Link of class 'Lcom/google/
> gdata/data/media/MediaMultipart;' failed
> 11-03 12:00:16.623: ERROR/dalvikvm(1702): Could not find class
> 'com.google.gdata.data.media.MediaMultipart', referenced from method
> com.google.gdata.client.media.MediaService.insert
> 11-03 12:00:16.623: WARN/dalvikvm(1702): VFY: unable to resolve new-
> instance 861 (Lcom/google/gdata/data/media/MediaMultipart;) in Lcom/
> google/gdata/client/media/MediaService;
> 11-03 12:00:16.623: DEBUG/dalvikvm(1702): VFY: replacing opcode 0x22
> at 0x0020
> 11-03 12:00:16.623: DEBUG/dalvikvm(1702): Making a copy of Lcom/google/
> gdata/client/media/MediaService;.insert code (256 bytes)
> 11-03 12:00:16.633: WARN/dalvikvm(1702): VFY: unable to resolve
> exception class 1743 (Ljavax/mail/MessagingException;)
> 11-03 12:00:16.633: WARN/dalvikvm(1702): VFY: unable to find exception
> handler at addr 0x55
> 11-03 12:00:16.633: WARN/dalvikvm(1702): VFY:  rejected Lcom/google/
> gdata/client/media/MediaService;.insert (Ljava/net/URL;Lcom/google/
> gdata/data/IEntry;)Lcom/google/gdata/data/IEntry;
> 11-03 12:00:16.643: WARN/dalvikvm(1702): VFY:  rejecting opcode 0x0d
> at 0x0055
> 11-03 12:00:16.643: WARN/dalvikvm(1702): VFY:  rejected Lcom/google/
> gdata/client/media/MediaService;.insert (Ljava/net/URL;Lcom/google/
> gdata/data/IEntry;)Lcom/google/gdata/data/IEntry;
> 11-03 12:00:16.643: WARN/dalvikvm(1702): Verifier rejected class Lcom/
> google/gdata/client/media/MediaService;
> 11-03 12:00:16.653: DEBUG/AndroidRuntime(1702): Shutting down VM
> 11-03 12:00:16.653: WARN/dalvikvm(1702): threadid=3: thread exiting
> with uncaught exception (group=0x4001b188)
> 11-03 12:00:16.663: ERROR/AndroidRuntime(1702): Uncaught handler:
> thread main exiting due to uncaught exception
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702): java.lang.VerifyError:
> com.google.gdata.client.media.MediaService
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> com.agsf.picasa.Welcome.onCreate(Welcome.java:24)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1047)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2417)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2470)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.app.ActivityThread.access$2200(ActivityThread.java:119)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.os.Looper.loop(Looper.java:123)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> android.app.ActivityThread.main(ActivityThread.java:4310)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:860)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> 11-03 12:00:16.693: ERROR/AndroidRuntime(1702):     at
> dalvik.system.NativeStart.main(Native Method)
>
> My question is: is it possible to do this on android? If yes, then how
> do i do that? Am i missing some library or some other thing.
>
> OR if it is not possible, can you guys point to me on these pages?
>
> Thanks..

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to