This document contains some instructions about developing this application.
You need to have the following software installed:
- Java 11
- Gradle 6.5
- Android SDK (API level 30)
- Git
- Android Studio 4.1.2
Preferred operating system is Ubuntu.
The following Android frameworks / libraries are used in this application:
- RoboGuice (dependency injection framework for Android based on Google Guice)
- Robolectric (advanced unit testing framework for Android)
- AndroidAnnotations (simplify Android development with annotations)
- Project Lombok (simplify Java development with annotations generating e.g. getters and setters)
- WeatherIconView (show weather icons using a font)
- FlexboxLayout (flexible CSS style flexbox layout for Android)
- Java Map Projection Library in Android (Used for map projection calculation, JAR file in own testbd repo)
- Color Picker (Android color picker for color preferences)
Some instructions for using Robolectric:
- https://github.com/robolectric/robolectric/wiki
- https://github.com/codepath/android_guides/wiki/Unit-Testing-with-Robolectric
- Checkout the sources from GitHub:
git clone [email protected]:mvestola/helsinki-testbed2-android.git
- Open the project with Android Studio and run gradle command
build
to build the project.
You should also set the Android SDK to environmental variable "ANDROID_HOME"
To sign a release version of the application, you need to have a file ~/.gradle/gradle.properties
with the following content:
RELEASE_STORE_FILE=/your/store/file/location
RELEASE_STORE_PASSWORD=your_store_password
RELEASE_KEY_ALIAS=your_alias
RELEASE_KEY_PASSWORD=your_key_password
The maven repository for this project is hosted at github: https://raw.github.com/mvestola/helsinki-testbed2-android-repo/master/repo (yes, it returns 404 if you go to the url with your browser, but that does not matter)
The repo was made by following the instructions below: http://blog.marrowboy.co.uk/2011/11/08/how-to-host-a-maven-repo-on-github/
You can add more jars to the repo by cloning the repo and executing mvn deploy:deploy-file
(http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html).
For example (all in one line):
mvn deploy:deploy-file \
-DgroupId=com.jhlabs \
-DartifactId=javaproj-noawt \
-Dversion=1.0.6 \
-Dpackaging=jar \
-Dfile=/path/in/your/computer/javaproj-1.0.6-noawt.jar \
-DrepositoryId=testbed2repo \
-Durl=file:///path/in/your/computer/to/the/clonedrepo/helsinki-testbed2-android-repo/repo
Test at least these special cases:
- Downloading images while changing screen orientation (Ctrl+F11). Should not pause download.
- Slow network connection
- Emulator with oldest supported API version and small screen
- Only one map image selected.
- No network connection (disable network from computer running emulator). Should show error dialog.
- Parsing error (change HTML_TIMESTAMP_PREFIX to some invalid value). Should show error dialog.
- Cancelling download in ParsingActivity and AnimationActivity. Should show toast.
- Continuing download when download cancelled. Should not download all images again.
- Try to kill app with DDMS when it is in the background. Should not fail when resuming.
- Use very fast animation (0.1 sec).
- Play/pause button icon when application goes to background, returning from preferences and using the slider.
- Both English and Finnish languages (change language from the Emulator's "Custom locale")
- Default settings (remove the app and reset all saved settings)
- Try out with large screen device such as tablet
- Change the version code and version name from
build.gradle
- Update
CHANGELOG.md
- Update
whats_new_text
fromres/values/strings.xml
(both English and Finnish) - Create a signed package by running
Build...Build Bundles / APKs...Build bundles
from the Android studio using the build variantrelease
(bottom left corner in Android Studio) - Tag the code:
git tag -a 2.0.x -m 'Tagged 2.0.x'; git push --tags
- Upload the file
build/outputs/apk/testbed-release.aab
to Google Play and activate it - Update "Recent Changes" in Google Play (both English and Finnish)
- Get rid of RoboGuice and use Dagger Hilt