Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v2.5.7+507 #137

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f17d173
Updated Health rules (#107).
Sep 2, 2020
4bc9b26
Do not process pending events if we failed to load history (#94).
Sep 2, 2020
a4f5dc1
Updated changelog.
Sep 2, 2020
a51b804
Mark pending event that persist in history table as processed.
Sep 2, 2020
b322013
Updated changelog.
Sep 2, 2020
024571c
Fix issue with _determineIsOpen not checking weekDay (#111)
sbutler Sep 3, 2020
947dc65
Updated changelog.
Sep 3, 2020
53e59f9
Add null check before using instance props (#119)
sbutler Sep 4, 2020
57e1065
Updated changelog.
Sep 4, 2020
3cb518c
Version 2.5.5+505
Sep 8, 2020
c08e0e4
version: 2.5.6+506
Sep 8, 2020
fb3cc08
Removed SAR status entries from sample health rules. Use PCR entries …
Sep 8, 2020
b30832c
Fixed unused warning.
Sep 8, 2020
71441b1
Updated changelog.
Sep 8, 2020
28c5cb1
Fixed changelog format.
Sep 8, 2020
cbe1f79
Added 'test-user' condition [#125].
Sep 8, 2020
ac66b8f
Updated changelog.
Sep 8, 2020
d7c29a3
Merge pull request #126 from rokwire/feature/issue-125
Sep 8, 2020
c7b3a8b
Do not use explicit references to nextStep from status blob.
Sep 8, 2020
8bcf9b5
Use displayReason for status update reason, translate the date.
Sep 8, 2020
bb7a71a
Introduced and acknowledged nextStepHtml in HealthRuleStatus2 and Cov…
Sep 8, 2020
0f71f05
Merge pull request #129 from rokwire/feature/issue-128
Sep 8, 2020
ceec2f7
Updated changelog.
Sep 8, 2020
00eeb67
Introduced and acknowledged warning in HealthRuleStatus2 and Covid19S…
Sep 8, 2020
b7c0185
Merge pull request #130 from rokwire/feature/issue-127
Sep 8, 2020
638464d
Updated changelog.
Sep 8, 2020
c53e1da
Feature/issue 132 (#134)
dobromirdobrev Sep 9, 2020
b3d505d
Use HTML formatted next step for exposure rule, require test on 4th d…
Sep 9, 2020
8d7fc29
Merge branch 'support/v2.5' into feature/issue-133
Sep 9, 2020
efaa60b
Merge pull request #135 from rokwire/feature/issue-133
Sep 9, 2020
10b125e
Added "More Info" section in next step html content (#133).
Sep 9, 2020
adbced8
Replaced "Covid-19" with "COVID-19".
Sep 9, 2020
39e92e3
Merge pull request #136 from rokwire/feature/issue-133
Sep 9, 2020
75fc7ed
Check both nextStep & nextStepHtml when checking for "requiresTest"
Sep 9, 2020
50680b5
Updated changelog.
Sep 9, 2020
b639314
version: 2.5.7+507
Sep 9, 2020
cdc7098
Merge branch 'master' into release/v2.5.7+507
Sep 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [2.5.7] - 2020-09-09
### Changed
- Integrate maps for test locations [#132](https://github.com/rokwire/safer-illinois-app/issues/132).
- Use next step HTML in exposure rules [#133](https://github.com/rokwire/safer-illinois-app/issues/133).
- Various minor fixes.

## [2.5.6] - 2020-09-08
### Changed
- Removed SAR status entries from sample health rules. Use PCR entries instead that actually contain the same status rules.
- Fixed warnings.

### Added
- Added 'test-user' condition [#125](https://github.com/rokwire/safer-illinois-app/issues/125).
- Added 'next_step_html' to status rules and status blob. Acknowleged in Info and Next Steps panels. [#128](https://github.com/rokwire/safer-illinois-app/issues/128).
- Added 'warning' to status rules and status blob. Acknowleged in Info panel. [#127](https://github.com/rokwire/safer-illinois-app/issues/127).

## [2.5.5] - 2020-09-04
### Changed
- Build number to 505
- Updated health rules. [#107](https://github.com/rokwire/safer-illinois-app/issues/107)
- Do not process pending events if we failed to load history. [#94](https://github.com/rokwire/safer-illinois-app/issues/94)
- Mark pending event that persist in history table as processed.

### Fixed
- Add null check before using instance props. [#119](https://github.com/rokwire/safer-illinois-app/pull/119)
- Fix issue with _determineIsOpen not checking weekDay. [#111](https://github.com/rokwire/safer-illinois-app/pull/111)

## [2.4.5] - 2020-09-01
### Changed
Expand Down
11 changes: 11 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

manifestPlaceholders = [
mapsApiKey : "${keysProperties.getProperty('googleMapsApiKey')}",
backupApiKey: "${keysProperties.getProperty('androidBackupApiKey')}"
]
}
Expand Down Expand Up @@ -137,6 +138,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.android.volley:volley:1.1.1'
//Firebase
implementation 'com.google.firebase:firebase-core:17.2.3'
Expand All @@ -146,6 +148,15 @@ dependencies {
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
//end Common

//Google Maps
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
//end Google Maps

//Google Maps Utils
implementation 'com.google.maps.android:android-maps-utils:0.5'
//end Google Maps Utils

//Zxing
implementation 'com.google.zxing:core:3.3.0' //Use zxing 3.3.0 because we have minSdk < 24
implementation ('com.journeyapps:zxing-android-embedded:4.1.0@aar') { transitive = false }
Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:allowBackup"
android:usesCleartextTraffic="true">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${mapsApiKey}"/>
<meta-data
android:name="com.google.android.backup.api_key"
android:value="${backupApiKey}" />
Expand Down
14 changes: 13 additions & 1 deletion android/app/src/main/java/edu/illinois/covid/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@

import android.os.ParcelUuid;

import com.google.android.gms.maps.model.LatLng;

import java.util.UUID;

public class Constants {

//Flutter communication methods
static final String APP_INIT_KEY = "init";
static final String MAP_DIRECTIONS_KEY = "directions";
static final String MAP_PICK_LOCATION_KEY = "pickLocation";
static final String MAP_KEY = "map";
static final String SHOW_NOTIFICATION_KEY = "showNotification";
static final String APP_DISMISS_SAFARI_VC_KEY = "dismissSafariVC";
Expand All @@ -41,6 +42,17 @@ public class Constants {
static final String HEALTH_RSI_PRIVATE_KEY = "healthRSAPrivateKey";
static final String BARCODE_KEY = "barcode";

//Maps
public static final LatLng DEFAULT_INITIAL_CAMERA_POSITION = new LatLng(40.102116, -88.227129); //Illinois University: Center of Campus //(40.096230, -88.235899); // State Farm Center
public static final float DEFAULT_CAMERA_ZOOM = 17.0f;
static final float FIRST_THRESHOLD_MARKER_ZOOM = 16.0f;
static final float SECOND_THRESHOLD_MARKER_ZOOM = 16.89f;
static final int MARKER_TITLE_MAX_SYMBOLS_NUMBER = 15;
public static final double EXPLORE_LOCATION_THRESHOLD_DISTANCE = 200.0; //meters
public static final float INDOORS_BUILDING_ZOOM = 17.0f;
public static final String ANALYTICS_ROUTE_LOCATION_FORMAT = "{\"latitude\":%f,\"longitude\":%f,\"floor\":%d}";
public static final String ANALYTICS_USER_LOCATION_FORMAT = "{\"latitude\":%f,\"longitude\":%f,\"floor\":%d,\"timestamp\":%d}";

//Health
static final String HEALTH_SHARED_PREFS_FILE_NAME = "health_shared_prefs";

Expand Down
54 changes: 47 additions & 7 deletions android/app/src/main/java/edu/illinois/covid/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import android.Manifest;
import android.app.Application;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
Expand Down Expand Up @@ -49,6 +50,9 @@

import edu.illinois.covid.exposure.ExposurePlugin;
import edu.illinois.covid.gallery.GalleryPlugin;
import edu.illinois.covid.maps.MapActivity;
import edu.illinois.covid.maps.MapDirectionsActivity;
import edu.illinois.covid.maps.MapViewFactory;
import io.flutter.app.FlutterActivity;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
Expand All @@ -66,14 +70,13 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho

private ExposurePlugin exposurePlugin;

private static MethodChannel.Result pickLocationResult;

private HashMap keys;

private int preferredScreenOrientation;
private Set<Integer> supportedScreenOrientations;

private RequestLocationCallback rlCallback;

// Gallery Plugin
private GalleryPlugin galleryPlugin;

Expand Down Expand Up @@ -139,6 +142,10 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
private void registerPlugins() {
GeneratedPluginRegistrant.registerWith(this);

// MapView
Registrar registrar = registrarFor("MapPlugin");
registrar.platformViewRegistry().registerViewFactory("mapview", new MapViewFactory(this, registrar));

// ExposureNotifications
Registrar exposureRegistrar = registrarFor("ExposurePlugin");
exposurePlugin = ExposurePlugin.registerWith(exposureRegistrar);
Expand Down Expand Up @@ -169,6 +176,35 @@ private void initWithParams(Object keys) {
this.keys = keysMap;
}

private void launchMapsDirections(Object explore, Object options) {
Intent intent = new Intent(this, MapDirectionsActivity.class);
if (explore instanceof HashMap) {
HashMap singleExplore = (HashMap) explore;
intent.putExtra("explore", singleExplore);
} else if (explore instanceof ArrayList) {
ArrayList exploreList = (ArrayList) explore;
intent.putExtra("explore", exploreList);
}
HashMap optionsMap = (options instanceof HashMap) ? (HashMap) options : null;
if (optionsMap != null) {
intent.putExtra("options", optionsMap);
}
startActivity(intent);
}

private void launchMap(Object target, Object options, Object markers) {
HashMap targetMap = (target instanceof HashMap) ? (HashMap) target : null;
HashMap optionsMap = (options instanceof HashMap) ? (HashMap) options : null;
ArrayList<HashMap> markersValues = (markers instanceof ArrayList) ? ( ArrayList<HashMap>) markers : null;
Intent intent = new Intent(this, MapActivity.class);
Bundle serializableExtras = new Bundle();
serializableExtras.putSerializable("target", targetMap);
serializableExtras.putSerializable("options", optionsMap);
serializableExtras.putSerializable("markers", markersValues);
intent.putExtras(serializableExtras);
startActivity(intent);
}

private void launchNotification(MethodCall methodCall) {
String title = methodCall.argument("title");
String body = methodCall.argument("body");
Expand Down Expand Up @@ -435,13 +471,17 @@ public void onMethodCall(MethodCall methodCall, @NonNull MethodChannel.Result re
result.success(true);
break;
case Constants.MAP_DIRECTIONS_KEY:
result.success(null);
break;
case Constants.MAP_PICK_LOCATION_KEY:
result.success(null);
Object explore = methodCall.argument("explore");
Object optionsObj = methodCall.argument("options");
launchMapsDirections(explore, optionsObj);
result.success(true);
break;
case Constants.MAP_KEY:
result.success(null);
Object target = methodCall.argument("target");
Object options = methodCall.argument("options");
Object markers = methodCall.argument("markers");
launchMap(target, options,markers);
result.success(true);
break;
case Constants.SHOW_NOTIFICATION_KEY:
launchNotification(methodCall);
Expand Down
Loading