Android Open Source - ChallengeYourFriends Challenge






From Project

Back to project page ChallengeYourFriends.

License

The source code is released under:

GNU General Public License

If you think the Android project ChallengeYourFriends 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

import java.util.ArrayList;
//from  w ww . j a va  2 s . c  o m

public class Challenge {
  
  public String challengeName;
  public String link;
  public ArrayList<String> rules;
  public int numOfDays;
  
  private static int id = -1; // Needs to be synced with database
  
  
  public Challenge(String challengeName, int numOfDays, ArrayList<String> rules)
  {
    this.challengeName = challengeName;
    this.numOfDays = numOfDays;
    this.rules = rules;
    id = id + 1;
  }
  
  public Challenge(String challengeName, int numOfDays, ArrayList<String> rules, String link)
  {
    this.challengeName = challengeName;
    this.numOfDays = numOfDays;
    this.rules = rules;
    this.link = link;
    id = id + 1;
  }

  public String challengeTweet()
  {
    String tweet;
    if(link != null)
      tweet = " has " + numOfDays + " days to complete the #" + challengeName + "Challenge. " + link + " #CYF";
    else
      tweet = " has " + numOfDays + " days to complete the #" + challengeName + "Challenge. #CYF";
    return tweet;
  }
  
  public int getId()
  {
    return id;
  }
  
  
  public ArrayList<String> getRules()
  {
    return rules;
  }
  
  public String getName()
  {
    return challengeName;
  }
  
}




Java Source Code List

.ChallengeArchive.java
.ChallengeFriends.java
.Challenge.java
.CreateChallenge.java
.LogIn.java
.LogOut.java
.User.java
com.cyf.challengeyourfriends.ChallengeFriend.java
com.cyf.challengeyourfriends.ChooseFriendDialog.java
com.cyf.challengeyourfriends.ChooseFriendFrag.java
com.cyf.challengeyourfriends.FriendMan.java
com.cyf.challengeyourfriends.LoginActivity.java
com.cyf.challengeyourfriends.MainActivity.java
com.cyf.challengeyourfriends.MenuActivity.java
com.cyf.challengeyourfriends.ViewChallenges.java
.test.java