Android Open Source - com.elsewhat.android.slideshow Smug Mug Recent Backend






From Project

Back to project page com.elsewhat.android.slideshow.

License

The source code is released under:

Copyright (C) 2012 Dagfinn Parnas <dagfinn.parnas@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Sof...

If you think the Android project com.elsewhat.android.slideshow listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.elsewhat.android.slideshow.backend;
//from w  ww  .j a  v  a  2 s.c o m
import java.util.List;

import com.elsewhat.android.slideshow.api.SlideshowPhoto;

import android.content.Context;



/**
 * NOT FUNCTIONAL
 * 
 * A start for a backend bacsed on smug mug
 * 
 * @author dagfinn.parnas
 *
 */
public class SmugMugRecentBackend {
  String smugMugUser;
  public SmugMugRecentBackend(String smugMugUser){
    this.smugMugUser=smugMugUser;
  }
  /**
   * Method for retrieving photos from Smug mug api
   * NOT IN USE
   * 
   * @param context
   * @param nickname
   * @return
   */
  public List<SlideshowPhoto> getSlideshowPhotos(Context context) throws Throwable {
    //String feedURL = "http://api.smugmug.com/hack/feed.mg?Type=nicknameRecent&Data="
    //    + smugMugUser + "&format=atom03&Size=X2Large";

    /* TODO: Implement
    try {
      String feedResponse = Util.getResponseFromUrl(context, feedURL);
      Pattern regexPattern = Pattern.compile("<id>(.*?)</id>");
      Matcher regexMatcher = regexPattern.matcher(feedResponse);
      ArrayList<String> alPhotoUrls = new ArrayList<String>(50);
      while(regexMatcher.find()){
        //String fullString = regexMatcher.group(0);
        String url =regexMatcher.group(1);
        
        if(!url.endsWith("/")){
          alPhotoUrls.add(url);
        }
        
      }
      
      if(alPhotoUrls.size()==0){
        return null;
      }else {
        return alPhotoUrls.toArray(new String[alPhotoUrls.size()]);
      }
      
    } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      return null;
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      return null;
    }*/
    return null;
    
    
  }
  
  
}




Java Source Code List

com.elsewhat.android.slideshow.activities.ChromecastAddin.java
com.elsewhat.android.slideshow.activities.ISlideshowInstance.java
com.elsewhat.android.slideshow.activities.SlideshowActivity.java
com.elsewhat.android.slideshow.activities.SlideshowDreamService.java
com.elsewhat.android.slideshow.activities.SlideshowPreferences.java
com.elsewhat.android.slideshow.api.Analytics.java
com.elsewhat.android.slideshow.api.AndroidUtils.java
com.elsewhat.android.slideshow.api.AsyncQueueableObject.java
com.elsewhat.android.slideshow.api.AsyncReadQueue.java
com.elsewhat.android.slideshow.api.CustomGallery.java
com.elsewhat.android.slideshow.api.DeletablePreference.java
com.elsewhat.android.slideshow.api.DownloadableObject.java
com.elsewhat.android.slideshow.api.FileDownloader.java
com.elsewhat.android.slideshow.api.FileUtils.java
com.elsewhat.android.slideshow.api.FlingKeyEvent.java
com.elsewhat.android.slideshow.api.ImageAdapter.java
com.elsewhat.android.slideshow.api.QueueablePhotoObject.java
com.elsewhat.android.slideshow.api.ReadOnlyPreference.java
com.elsewhat.android.slideshow.api.SlideshowBackend.java
com.elsewhat.android.slideshow.api.SlideshowPhotoCached.java
com.elsewhat.android.slideshow.api.SlideshowPhotoDrawable.java
com.elsewhat.android.slideshow.api.SlideshowPhoto.java
com.elsewhat.android.slideshow.backend.FlickrPublicSetBackend.java
com.elsewhat.android.slideshow.backend.OPMLBackend.java
com.elsewhat.android.slideshow.backend.SmugMugRecentBackend.java