This repository has been archived by the owner on May 18, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to events and session list functionality. Started adding twit…
…ter feed for events.
- Loading branch information
1 parent
7c26ff1
commit fd3e1b6
Showing
44 changed files
with
846 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
src/com/springsource/greenhouse/events/EventTweetsActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.springsource.greenhouse.events; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.social.greenhouse.api.Event; | ||
import org.springframework.social.greenhouse.api.Tweet; | ||
import org.springframework.social.greenhouse.api.TweetFeed; | ||
|
||
import android.os.AsyncTask; | ||
import android.util.Log; | ||
|
||
import com.springsource.greenhouse.twitter.TweetsListActivity; | ||
|
||
public class EventTweetsActivity extends TweetsListActivity { | ||
|
||
private static final String TAG = EventTweetsActivity.class.getSimpleName(); | ||
|
||
|
||
//*************************************** | ||
// TweetsListActivity methods | ||
//*************************************** | ||
@Override | ||
protected void downloadTweets() { | ||
new DownloadTweetsTask().execute(); | ||
} | ||
|
||
|
||
//*************************************** | ||
// Private classes | ||
//*************************************** | ||
private class DownloadTweetsTask extends AsyncTask<Void, Void, List<Tweet>> { | ||
|
||
private Exception exception; | ||
|
||
@Override | ||
protected void onPreExecute() { | ||
showProgressDialog(); | ||
} | ||
|
||
@Override | ||
protected List<Tweet> doInBackground(Void... params) { | ||
try { | ||
Event event = getSelectedEvent(); | ||
if (event == null) { | ||
return null; | ||
} | ||
TweetFeed feed = getApplicationContext().getGreenhouseApi().tweetOperations().getTweetsForEvent(event.getId()); | ||
return feed.getTweets(); | ||
} catch(Exception e) { | ||
Log.e(TAG, e.getLocalizedMessage(), e); | ||
exception = e; | ||
} | ||
|
||
return null; | ||
} | ||
|
||
@Override | ||
protected void onPostExecute(List<Tweet> result) { | ||
dismissProgressDialog(); | ||
processException(exception); | ||
setTweets(result); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.