A demo of the app (in Greek) can be found here.
It is very easy to install multiple versions of NodeJS and npm, by using Node Version Manager (nvm).
This project was built using the following versions of nodejs and npm:
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
, run this command in order to sync to the correct NodeJS version for the project:
nvm use
$ npm install -g @ionic/[email protected]
$ npm install -g [email protected]
$ cd dianoia-app
$ npm install
$ ionic serve
Then, to run it in a real Android device, cd into dianoia-app
and run:
$ ionic cordova platform add [email protected]
$ ionic cordova emulate android
Update the following files:
resources/icon.png
and
resources/splash.png
And then run
$ ionic cordova resources
To generate the icon and splash screen files for all platforms and dimensions. For more info read this page.
The app has several places where the app version is defined. Change the following:
- In the
config.xml
file, change theandroid-versionCode
parameter, as well as theversion
(widget
tag). - Change the
version
inpackage.json
file. - Change the
APP_VERSION
constant, defined insrc/consts.ts
file.
In order to build for Android, Java 1.8
is required, along with Gradle 4.4.1
.
Verify your installations by running:
$ 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:
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
And selecting the correct one.
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.
In order to build the android platform, you will need the correct version of the cordova-android plugin:
$ ionic cordova platform rm android
$ ionic cordova platform add [email protected]
You will need to open the platforms/android/CordovaLib/build.gradle
file and change the repositories
in buildscript
, in order to have this:
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
jcenter()
maven { url "https://repo.grails.org/grails/core/" }
}
...
}
Then, you can build the Android project by running:
$ 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:
$ ionic cordova build android --release
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.
In order to generate a bundled directory that can be hosted as a web application, you need to add and build the browser
platform:
$ ionic cordova platform add [email protected]
$ ionic cordova build browser
If you want to reset the browser platform:
Automated way:
$ npm run build-browser
Manual way:
$ 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.
In order to generate the docs
directory that can be used from GitHub Pages, you need to run the following script:
$ npm run build-docs
This will generate the docs
directory. (Note that this directory is and should be under Version Control).
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.
Το project “Διάνοια” υλοποιείται από τη Μη Κερδοσκοπική Εταιρεία SciFY στο πλαίσιο του προγράμματος “Σημεία Στήριξης” που συγχρηματοδοτείται από το ΤΙΜΑ Κοινωφελές Ίδρυμα, το Κοινωφελές Ίδρυμα Ιωάννη Σ. Λάτση, τη φιλανθρωπική οργάνωση Hellenic Hope και το Ίδρυμα Μποδοσάκη.
Περισσότερες πληροφορίες για το έργο σε αυτόν τον σύνδεσμο.