Android Open Source - Gloggr Game






From Project

Back to project page Gloggr.

License

The source code is released under:

GNU General Public License

If you think the Android project Gloggr 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.JordHan.Gloggr.Model;
//  ww w . j ava2 s.c  om
import org.json.JSONObject;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable
public class Game {
    // Members and database field annotations
  // Game identification information
    @DatabaseField(id = true)
    private String id;  
    private String title;
    private String system;
    // User specific information
    private int percentageFinished;
    private int rating;
    private String notes;
    
    // No argument constructor
    // Used for ORMLite
    public Game() { }
    
    // Constructor which uses JSONObject
    public Game(JSONObject game) {
      // Parse JSON here
    }
    
    // Constructor which uses separate parameters
    public Game(String id, String title, String system, 
        int percentageFinished, int rating, String notes) {
      this.id = id;
      this.title = title;
      this.system = system;
      this.percentageFinished = percentageFinished;
      this.rating = rating;
      this.notes = notes;
    }
    
    // Getters
    public String getID() {
        return this.id;
    }
    
    public String getTitle() {
      return this.title;
    }
    
    public String getSystem() {
      return this.system;
    }
    
    public int getPercentageFinished() {
      return this.percentageFinished;
    }
    
    public int getRating() {
      return this.rating;
    }
    
    public String getNotes() {
      return this.notes;
    }
    
    @Override
    public String toString() {
      return this.title + " for " + this.system;
    }
}




Java Source Code List

com.JordHan.Gloggr.Activities.CurrentlyPlayingActivity.java
com.JordHan.Gloggr.Activities.GameListActivity.java
com.JordHan.Gloggr.Activities.MainActivity.java
com.JordHan.Gloggr.Activities.PreferencesActivity.java
com.JordHan.Gloggr.Activities.SearchActivity.java
com.JordHan.Gloggr.Activities.Notification.AboutAppActivity.java
com.JordHan.Gloggr.Activities.Notification.AboutDeveloperActivity.java
com.JordHan.Gloggr.Helper.MenuHelper.java
com.JordHan.Gloggr.Model.Game.java
com.JordHan.Gloggr.Services.AbstractService.java
com.JordHan.Gloggr.Services.GameSearchService.java
com.JordHan.Gloggr.Services.IServiceListener.java
com.JordHan.Gloggr.db.DatabaseHelper.java
com.JordHan.Gloggr.db.DatabaseManager.java