Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scify/dianoia-app

Mobile (Ionic 3 - Angular 4) app about non-pharmaceutical activities and information for people with dementia.
https://github.com/scify/dianoia-app

angular2 angular4 cordova dementia hacktoberfest hybrid-apps ionic ionic2 ionic3 mobile-app offline-app offline-capable offline-first pharmaceutical-activities typescript

Last synced: about 2 months ago
JSON representation

Mobile (Ionic 3 - Angular 4) app about non-pharmaceutical activities and information for people with dementia.

Awesome Lists containing this project

README

        

# Dianoia - Ionic Mobile app





A demo of the app (in Greek) can be found [here](https://scify.github.io/Dianoia-app/#/home).

## Non-pharmaceutical activities for people with dementia.

## Pre-setup steps

It is very easy to install multiple versions of NodeJS and npm, by using [Node Version Manager (nvm)](https://github.com/creationix/nvm).

This project was built using the following versions of nodejs and npm:

```bash
nvm install lts/fermium # (or nvm install v14.21.1)

node -v
v14.21.1

npm -v
6.14.17
```

Alternatively, if you are using [`nvm`](https://github.com/nvm-sh/nvm), run this command in order to sync to the correct NodeJS version for the project:

```bash
nvm use
```

## Install project dependencies:

```bash
$ npm install -g @ionic/[email protected]

$ npm install -g [email protected]

$ cd dianoia-app

$ npm install

$ ionic serve
```

## Execution
Then, to run it in a real Android device, cd into `dianoia-app` and run:

```bash
$ ionic cordova platform add [email protected]

$ ionic cordova emulate android
```

## Generating icon and splash screen for all platforms

Update the following files:

`resources/icon.png`

and

`resources/splash.png`

And then run

```bash
$ ionic cordova resources
```

To generate the icon and splash screen files for all platforms and dimensions. For more info read [this page](https://ionicframework.com/docs/cli/commands/cordova-resources).

## Building

### How to change app version before building for release

The app has several places where the app version is defined. Change the following:

1. In the `config.xml` file, change the `android-versionCode` parameter, as well as the `version` (`widget` tag).
2. Change the `version` in `package.json` file.
3. Change the `APP_VERSION` constant, defined in `src/consts.ts` file.

### Building for Android

#### Java - Gradle
In order to build for Android, Java `1.8` is required, along with Gradle `4.4.1`.

Verify your installations by running:
```bash
$ java -version

$ gradle -version
```

You will need Java version `1.8` on your system. If you have multiple versions of Java installed, you will need to update the current one by running:

```bash
$ sudo update-alternatives --config java

$ sudo update-alternatives --config javac
```
And selecting the correct one.

#### Firebase Analytics
Since the project uses Firebase Analytics, In order to build for Android you have to put the `google-services.json` file from Firebase Console to the root directory.
The build process will then copy this file to the `platforms/andorid/app` directory.

### Creating the platform files

In order to build the android platform, you will need the correct version of the cordova-android plugin:

```bash
$ ionic cordova platform rm android

$ ionic cordova platform add [email protected]
```

### Building the Android project

You will need to open the `platforms/android/CordovaLib/build.gradle` file and change the `repositories` in `buildscript`, in order to have this:

```gradle
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
jcenter()
maven { url "https://repo.grails.org/grails/core/" }
}
...
}
```

Then, you can build the Android project by running:

```bash
$ ionic cordova build android
```

The `build` command will generate a full Android project, located in `platforms/android`. This project can then be opened in Android Studio, in order to build and produce the .aap (bundle) or the .apk files.

If you want to build a release version:

```bash
$ ionic cordova build android --release
```
### Signing the Android .apk
After the android project is built, you can either use Android CLI commands, or just open Android Studio, and sign the .apk or .aap (bundle) file.

## Build for Browser

In order to generate a bundled directory that can be hosted as a web application, you need to add and build the `browser` platform:

```bash
$ ionic cordova platform add [email protected]

$ ionic cordova build browser
```

If you want to reset the browser platform:

Automated way:

```bash
$ npm run build-browser
```

Manual way:

```bash
$ ionic cordova platform rm browser

$ ionic cordova platform add [email protected]

$ ionic cordova build browser
```

This will generate a `platforms/browser/www` directory that can be uploaded to a server.

### GitHub pages

In order to generate the `docs` directory that can be used from GitHub Pages, you need to run the following script:

```bash
$ npm run build-docs
```

This will generate the `docs` directory. (Note that this directory is and should be under Version Control).

## License

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY



Copyright 2016

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

## Sponsors
Το project “Διάνοια” υλοποιείται από τη Μη Κερδοσκοπική Εταιρεία SciFY στο πλαίσιο του προγράμματος “Σημεία Στήριξης” που συγχρηματοδοτείται από το ΤΙΜΑ Κοινωφελές Ίδρυμα, το Κοινωφελές Ίδρυμα Ιωάννη Σ. Λάτση, τη φιλανθρωπική οργάνωση Hellenic Hope και το Ίδρυμα Μποδοσάκη.




Περισσότερες πληροφορίες για το έργο σε αυτόν τον σύνδεσμο.