Coder Social home page Coder Social logo

lucaberardi6 / android-tv-application Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 8.28 MB

Prototype of a quiz game application based on the Android TV platform.

License: GNU General Public License v3.0

Java 100.00%
andoidx android android-app androidtv androidtvleanback game java

android-tv-application's Introduction

Android-TV-application


Prototype of a quiz game application based on the Android TV platform.

Abstract

The prototype created is a quiz game, in which questions are asked to be answered correctly. The user can choose one of the following two game modes:

Single player: You can play alone on your TV. The user is asked a series of questions and, for each of them, he must select, among the three options proposed, the one he deems correct. Only at the end of the game, after having answered all the questions, the user gets a score based on the correct answers given during the game.

Two Players: You can play on the same TV with someone else. Players are asked the same number of questions and, as with the previous mode, the answer options are three, but the right one is only one.

For each of the two modes there are three types of challenges:

• game with five questions
• game with ten questions
• game with fifteen questions

Development

The application was developed using four Activities:

MainActivity: the launch Activity which represents the main screen of the application where it is possible to choose the game mode and the type of challenge. The MainFragment class is used to create the layout. The CardPresenter class was used to create each of the home cards. With this class it is possible to create a View associated with the game mode.

GameActivity: the Activity that represents the game screen. The user interacts with the application by answering the questions, selecting the option he deems correct.

NextActivity: the Activity used when the challenge between two players is chosen. The second player is invited to prepare, as he is about to start his turn.

EndActivity: the Activity used at the end of each game. The outcome of the game is displayed on the user interface and it is possible to start the MainActivity to play a new game.

The Question class has been created with which it is possible to associate its correct answer and its incorrect answers to a question. A Question object consists of five variables: the question, the correct answer, and the three possible answers.

A game mode is represented by a Mode object. A Mode object consists of a set of variables that are: a title that identifies the type of challenge, a description, the number of players, the number of questions, an image. A Mode is used in conjunction with the CardPresenter class to create the cards visible on the main screen that represent a given challenge for a specific game mode.

Sample video of the app

video.mp4

Screenshots of the app

Some screenshots from the app (to see other screenshots go to the dir Images):




Other details

Dark backgrounds have been used and a light gray color has been chosen for most of the text, so as not to create difficulties for the user in reading and viewing the elements. In addition, for better processing, the text is always divided into small parts. Each element has been made to a size that allows the user to see it properly at a distance of three meters and has been positioned to be easily reached, thus creating a coherent navigation for a TV device. All the layouts have been created with a horizontal orientation and, in addition to the resources available in the AndroidX Leanback library, RelativeLayout and LinearLayout have been used exclusively to create the View containers, so as to adapt the layout to the different characteristics of the television screens.

Bibliograpy

android-tv-application's People

Contributors

lucaberardi6 avatar

Watchers

 avatar

Forkers

akuz0

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.