GithubHelp home page GithubHelp logo

quizapp_android's Introduction

#Latest commit: Made some improvements to load the project faster, moved to android studio and gradle. I have to admit , this was my 2nd attempt at android app : ) , little buggy on the concepts of controllers and screens. I wanted to have a game and a state machine model when i started the code. I tried it keep the code classified as possible. Just email me if you want some feature or any short modifications. If you felt something about the project, just drop a Hello email to [email protected] , would make me happy. : )

Live Version here: https://play.google.com/store/apps/details?id=com.quizapp.tollywood

  • controllers manages screens(one or more screens).
  • A screen is just a linearlayout , when you need a screen to be shown, load the controller(by calling quizApp.loadAppController(Controller.class) ) do some logic and create the screen. quizApp.addView(Screen) will animate it.
  • All server related functionality is in ServerCalls.java , all calls are handled asynchronously with a generic listener , will more to tasks from bolt library if i find time.

#QuizApp android This a clone of popular trivia app QuizUp , written totally in android, without use of any graphic libraries. The server side runs on tornado, can horizontally scale over multiple instances by deploying more servers. QuizApp uses websockets for the multiplayer game.

Depends on:(included in libs) Autobahn websockets (https://github.com/tavendo/AutobahnAndroid) MPCharts Lib (https://github.com/PhilJay/MPAndroidChart) ormlite.

Most client configuration is in Config.java , do have a look into it. All the 'in game App strings' in UiUtils.java , use them to navigate though the code.

you will have to download a "google-services.json" with google-plus and gcm enables if you want to use it for a different build, i have included one by default , you can start from here to generate it.

https://developers.google.com/mobile/add?platform=android&cntapi=signin&cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fandroid%2Fsign-in%3Fconfigured%3Dtrue&cntlbl=Continue%20Adding%20Sign-In.

You will need QuizApp_tornado_server to launch the app you can clone it from here. I have deployed the mongo instances and the web server instances on google compute. Github quizApp Server,

###Steps to get the client and server working.

#Setting up Server :

  1. Launch mongoDB. there is a one click deploy on google compute, but it will cost you price.
  2. Configure Config.py , change the dbServer address to point to mongoDb.
  3. launch with

you might want to initialize first the first time launch by

- nohup sudo python server.py --port=80 --isFirstInit --serverId=master --serverAddr=http://quizapp.yourserver.com >/dev/null &
  1. The web management Ui is yet to be done.
  2. To remove an server instance you have to delete the entry from Db from the "servers" collection.(This is a little insecure)
    • get any secret key from the "secret_keys" collection. -use to reload web server map in all instances.

##Loading data to server 5. You will have to download Configure load_spreadsheet.py. QuizApp server google SpreadSheet The process is a little heavy, create a project in https://console.developers.google.com/ , go from API's enable drive Api , then from Credentials you have to create a OAuth Service client and download that json. Take the service account id and share the cloned spread sheet with your service account email id( this will enable api access to read from drive - https://developers.google.com/google-apps/spreadsheets/#creating_a_spreadsheet).

6 Place the downloaded credentials in a folder names config_files in the root directory. You may run "python load_spreedsheet.py" 'python load_spreadsheet.py syncall' to sync all the sheet.. else it will sync only the data marked with "isDirty:1" in the sheet.

###You can additonally load sample questions from telugu movies by 7. Load sample questions by running load_question_data.py and input as suggested in the output. on the root , type python and enter shell. exec(open("questions_json_processing/load_questions_from_json.py")) when promtps from path enter "questions_json_processing/questions_json"

exec(open("questions_json_processing/song_data_processing.py"))
when promtps from path enter  "questions_json_processing/song_data.json"
  1. Once the data is loaded , start the server by running server.py

##Client Configuration 8. In ServerCalls.java change the SERVER_ADDR and CDN path variables to suit your need ,pointing to the server and the server which hosts your images and asset files respectively.

Conversations/chatting works with Google GCM notifications for now.

#Scaling the server To launch a new server, change Config.py and add your current server to existing 'WebserverMap' and 'ExternalWebServerMap' with your server id , to the existing list , this list will be propagated to other servers , so update it carefully before launching the new server. You should be good to go, it integrates seemlessly in terms of horizontal scaling, MongoDb can be deployed in a cluster to scale the db . For any issues you can open up an issue or email [email protected]

This was stared as a random project, needs many changes perticularly in ui. And bug fixes :P All contributions and modifications are copylefted.

#Screenshots

Thanks Vinay for contributions to code.

#--

quizapp_android's People

Contributors

abhinavabcd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quizapp_android's Issues

server error

server.py error : argument port is required.
sir, can you please explain it deeply how to run server.
thanks you.

I used your code

I dont anderstand this
Take the service account id , and share the clones spread sheet sheet with that random email( this will enable api access to read from drive).

icon for QuizeApp

Hi @abhinavabcd, I am a graphic designer, I want to help you in graphic design.

After I review your project, your app is very good. Therefore I suggest a new logo and icon for you. If you want it, I will design it for you and it's free.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.