GithubHelp home page GithubHelp logo

behappy's Introduction

BeHappy is a Happy Me clone with added functionality

The app has been created using Phonegap and Cordova.

To create an APK use "phonegap build" command. The APK can be found in /platforms/android/build/outputs/apk/*

------ Functions ------

update_file(current_data) updates the data_array with the data from the current_date Then writes all the data within the data_array to the file using ExternalStorageSdcardAccess.scanPath();

format_date(date) good short simple function formats data like: 21/03/2016

read_write_file() uses global flag: new_data_to_be_written_to_file either reads the data from the file on app launch or writes data to the file on save.

process_data_array() extracts any data on the currently selected date updates the DOM with that information

load_date() loads the selected date from the data_array then updates the DOM with that information

go_back() method when back button is pressed to go from item selection to day view

MISC Changing pages, setting pages to displayed and hidden, updating bits of the DOM such as currently selected date adding a newly created or loaded date to the date selection screen * currently not done

------ Listeners ------

All the buttons on the different pages,

the back button between the selecting of the items such as food, this then updates the data object in the DOM and writes the changes to the file.

Adding a new date or selecting one that already exists.

------ Objects -------

data_array: array of objects for each of the days also contains the config_object

  • The config_object should be separated from the data_array

current_data: stores all the info about the currently selected date

// no long used: selected_date: The date that is currently being shown in the home_page

config_object: Contains the defaults for each of the categories such as diet, people, work, activities

behappy's People

Contributors

tomgb avatar

Watchers

James Cloos avatar

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.