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

initial release with demo data #4

Merged
merged 190 commits into from
Apr 7, 2020
Merged

initial release with demo data #4

merged 190 commits into from
Apr 7, 2020

Conversation

p0x6
Copy link
Owner

@p0x6 p0x6 commented Apr 7, 2020

No description provided.

davidbiga and others added 30 commits March 12, 2020 22:02
* Refactoring the copy-pasted buttons styles.

* Remove dead NegButton references

This also includes some code reformatting from VS Code, but mainly it
removes dangling references to the NegViews.

Co-authored-by: Steve Penrod <[email protected]>
Co-authored-by: Steve Penrod <[email protected]>
Using Adaptive Icons Android and preparing the app for release on the Apple Store.
* Massaged the look of the UI on the sub-pages and the main page
* Added description text to the Export page
* Changed the URL of the webview to:  https://privatekit.mit.edu/views
This changes several things about the data being stored:
* The time being stored in the structure is now UTC.  It was previous local
  time
* The data being stored is now simplified to:
   [ (utc_unix_time, GPS lat, GPS lon) ... ]
* The stored data is now limited to 28 days
Creates Statically Typed LocationServices class to handle all background instantiation once.

BackgroundGeolocation is smart in itself and will handle any form of termination events.  In addition, the onListen event `stop` was added where future release can include a local push notification to tell the user that location services were terminated.
 - Allows the file to be shared instead of raw string

NOTES: This requires accessing the filesystem when you do an Export. Potentially we'll need to warn people this is going to cause a popup.
Screen requests users to download the Google Takeout file for the Location History. 
After the download, users have to go back and come back to import. 

Watch the logs to see what the app is doing. We don't have the UI to let the user know the current progress yet.
Adds two scripts to make it easy to start the react system and (re)run
the application within the emulator.  Simply run:
  1_start_react.sh
To install packages and start the react ecosystem, then run
  2_start_android_app.sh
To launch the application within the Android emulator (launching the
emulator automatically if necessary).
Merge ended up with a missing comma in the package.json
When the application is already running, clicking on the icon (at
least under Android) would start another object for the logger.  This
does a quick instance count check to prevent multiple loggers.
It looks like the code got refactored and not all variables were renamed
during that, leading to some exceptions during import.  Just renamed vars
as appropriate.
Importing Google Location History
Exporting functions
* Add contribution guide
* Initialize .github files
Helping others get started
1. Package.json format must follow 0.0.0 version names. 
2. Version ID for the AppleStore and Android Stores are now the same.
The LocationServices refactor merge lost the changes that happened to
adding "curation" to the point data (PR Path-Check#35).  This restores it.
Now the Export screen shows a count of points to be exported.  This is
provides minimal information for debugging and to let the user understand
that something is happening in the background.

Co-authored-by: Abhishek Singh <[email protected]>
The HeadlessTask part of the BackgroundLocationTracker component wasn't
being used.  On Android, it spins up a special background task when the
main application has been shutdown to continue grabbing points.
Several people have said that 'yarn' works much better than 'npm', so I'm
making it the default if found.  If not, the script will still attempt to
run 'npm.
* Add missing notifications for Location Services

Several conditions cause Private Kit to stop failing when it cannot access
GPS info.  We should notify the user when this has happened.  That includes:
* The app doesn't have proper permissions
* The permissions have been revoked
* The location service has been shut down

Still to do is a notification to show the user that the background service
is not doing anything when the user turns off location services.

* Fix auto-format errors

The automatic formatting done in "Javascript" style instead of
"React Native"

* use 5 minute time interval

Co-authored-by: Abhishek Singh <[email protected]>
…r iOS (Path-Check#67)

* updated README.md

Made changes for developers on macOS with Xcode 10+

* Fixed Async storage, request cycles warnings

* using patch-package to work around RNFetchBlob recursive importing

* saving patch for RNFetchBlob recursive importing

* Putting native background geo back.

* re-fix AsyncStorage

* Fixing Background services not existing on iOS

* Fixing Internationalization on Xcode

* Import Alert and add stationarylocation logging

* capitalize L

Co-authored-by: Andy Nuzzo <[email protected]>
Co-authored-by: philrouge <[email protected]>
Co-authored-by: Abhishek Singh <[email protected]>
Added info on how to download a PR from a Forked Repo in order to review it.
p0x6 and others added 28 commits March 30, 2020 21:42
* CS (Czech) locale

This translation was created by myself. I am native speaker.

* Update languages.js

Indentation fixed

* CS (Czech) locale

CS (Czech) locale update

* Merge conflicts

Merge conflicts resolved, translation fixed.

* Update notification.json

Encoding changed to UTF8.

Co-authored-by: Abhishek Singh <[email protected]>
* Create exportscreen.json

* Create import.json

* Create index.js

* Create intro.json

* Create licensesscreen.json

* Create locationTracking.json

* Create notification.json

* Create overlap.json

* Update languages.js

* Update languages.js

* Delete exportscreen.json

* Delete import.json

* Delete index.js

* Delete licensesscreen.json

* Delete overlap.json

* Delete notification.json

* Delete locationTracking.json

* Delete intro.json

* hindi index file update

* hindi update

* Update import.json

* Update intro.json

* Create licensesscreen.json

* Update locationTracking.json

* Create notification.json

* Create overlap.json

* Update import.json

* Update locationTracking.json
* added new language urdu support for the urdu speaking community from India, Pakistan, Bangladesh and Afghanistan.

* fixed conflicts and added translation for new keys in overlap.json

* added new key vals

* added the missing braces in languages.js

* updated overlap_para_1 translation in overlap.js

* Remove extra lines

Co-authored-by: Talha <[email protected]>
Co-authored-by: Abhishek Singh <[email protected]>
* add gujarati support

* Create gj

* Delete gj

* Create intro.json

* Add files via upload

* Add files via upload

* updated overlap_para_1 and clarified show_overlap

* updated to include additional fields after data_hint

* fixed missing comma on line 5

* Update overlap.json

Co-authored-by: Abhishek Singh <[email protected]>
* Running build on develop.

* Keeping action to Master

* 0.5.11

* New version Test fix.
…e-kit into privateKitUIRefresh

* 'develop' of https://github.com/tripleblindmarket/private-kit:
  Version 0.5.11 (Path-Check#297)
  Update contribution documentation (Path-Check#293)
  add gujarati support (Path-Check#286)
  added new language support for the urdu  (Path-Check#258)
  Hindi translation update_Garvit_Joshi (Path-Check#292)
  CS (Czech) locale (Path-Check#213)
  Windows development scripts (Path-Check#288)
  Android Bluetooth Contact Tracing V1.  (Path-Check#279)
  Export fix for iOS (Path-Check#283)
fix snapshot test.
disable going back to intro screen.
fix navigation when you are in logging mode.
fix footer for languages with long text.
* Add Settings Screen - Path-Check#150 (Path-Check#160)

* Remove Additional Stop Location Recording

* Add Settings Screen

* Add Intersection of points download from authority (Path-Check#165)

With this PR the app now:

* Contacts each authority URL once every 12 hours
* Downloads intersection data from that authority
* Runs a simple point intersection against it
* Saves the exposure results in the CROSSED_PATHS storage array
* Still several things to do for an MVP, then more to optimize:

Authority cannot be edited yet (in Settings)
* No display of CROSSED_PATHS
* Only results from one Authority are saved
* Improve overlap calculation accuracy
* Optimize the intersection calculation

* Fix export issue

* Add settings screen (Path-Check#326)

* Create Settings screen

* Add navigation and translation for new screen

* Remove irrelevant components from Settings screen

* Add menu for authorities selection in Settings

* Add stylized button, FlatList bit to Settings

* Add styling to flatlist rows, add close icon

* Fix caps, add iterating menu off authorities obj

* Add add/remove data source functions

* Add translation variables and lines to Settings

* Fix menu icon color from purple to bluish grey

* Remove unnecessary whitespace in translation

* Prevent duplicates from authorities list

* Add custom URL input (all function)

* Add check for connection, let user know if error

* Now pulls authorities list from internet source

* Store user settings in async storage

* Version 0.5.4 (Build 9) (Path-Check#161)

* Simple Script to reset react native

* Version 0.5.4 (Build 9)

* Example code for private-set point intersection (Path-Check#163)

Add a complete Pytyon example of performing private set intersection.
This solution give pretty good privacy, estimated at approximately
10 days to crack a single published lat/lon/time point.

This is donated to the Private Kit project by Triple Blind, and
may be freely used within the project.

* V2overlap (Path-Check#166)

* display map

* working v2; only android

* improve and optimize map support;android only

* add heatmap code

* Automating Version & Build Numbers (Path-Check#169)

* Adding version and build number automator (Changes ReactNative, iOS and Android upon npm version).

* Removing Build Number from Targets on Xcode so that npm version with react-native-version can update the number automatically.

* Test Bundle version and Main Bundle version should be the same.

* 0.5.5

* Add NL (Dutch) locale (Path-Check#172)

* Changetext (Path-Check#175)

* Add News, Import, Export buttons

* add new colors

* add positive and sensitive buttons

* change button color in the main menu

* change text for overlap screen

* Version 0.5.6 (Path-Check#177)

* Adding version and build number automator (Changes ReactNative, iOS and Android upon npm version).

* Removing Build Number from Targets on Xcode so that npm version with react-native-version can update the number automatically.

* Test Bundle version and Main Bundle version should be the same.

* 0.5.5

* Production API keys.

* 0.5.6

* moving pod install command to npm run install:pod (Path-Check#173)

* Improve data exporter to share data with better names (Path-Check#174)

* Write file to filesystem before sharing

* Enhance sharing data output

- Updated react-native-share to 3.1.0 because of [issue](react-native-share/react-native-share#702)
- Separated out iOS specific and android share logic as the behaviors for sharing are significanlty different even for a simple case like filename

* Add support for 'Marathi' locale (Path-Check#154)

* Add support for 'Marathi' locale

* Incorporate review suggestions

Co-authored-by: Sagar Manohar <[email protected]>
Co-authored-by: Abhishek Singh <[email protected]>

* Translated pt locations files (Path-Check#125)

* Translated locations files from ingles to pt-br

* Updated sentence for better semantics, remintz suggestion

* Fix typo

* fixing broken link to issue list (Path-Check#186)

* Fix formatting in languages json due to merge (Path-Check#183)

This fixes a formatting issue due to a merge. Languages were added in multiple PRs and they didn't get merged together correctly.

* Added feedback for trace overlap if it comes back with no results (Path-Check#190)

See issue Path-Check#188 - I'd advise this is merged ASAP since the current build feels broken from a user perspective.

* minor version bump to clear Xcode warnings (Path-Check#168)

Co-authored-by: Vitor Pamplona <[email protected]>

* Bluetooth Broadcasting on Android.  (Path-Check#193)

* Running build on develop.

* Keeping action to Master

* Starting Bluetooth Beacon Broadcasting.

* Other ID was too big.

* Only runs Bluetooth on Android

* Changing Package version to 0.0.4 to pass tests on Phones without Bluetooth adapters.

* Fix broken layout on low-res devices using flex layout on LocationTracking.js and Overlap.js (Path-Check#196)

* quality of life improvements

* Add dynamic button text for trace overlap results

* Reenabled Prettier in Overlap.js but didn't format

* Add translation for overlap button text and title

* Move website link footer inside scrollview

* Use flex layout to fix display on low-res devices

* Update CSV data source, refine text (Path-Check#197)

* Update CSV data source, refine text

The source of the public data moved, breaking this feature.  Also
refined the text show and added a link to the public dataset.

* Change terminology for now

* Version: 0.5.8 (Path-Check#198)

* Running build on develop.

* Keeping action to Master

* Starting Bluetooth Beacon Broadcasting.

* Other ID was too big.

* Only runs Bluetooth on Android

* Changing Package version to 0.0.4 to pass tests on Phones without Bluetooth adapters.

* 0.5.7

* 0.5.8

* Fix typo in location tracking url_info text (Path-Check#200)

* Enhancing the License screen (Path-Check#202)

* Enhancing the License screen

The kebab > License screen now is a combination of an About screen
and a license.  The top of the screen shows information about the current
app version, OS version on which it is running and screen resolution info.

Below that is license test.  It pulls from the new LICENSE.json in the
assets directory.  It will render an array of licenses, so later we can
add the licenses of components we use in addition to the main Private
Kit MIT license.

* Remove debugging console.log() message

* Fix circles crash by only showing nearby circles (Path-Check#212)

* ESlint added and removed few errors (Path-Check#201)

Co-authored-by: Harsh Vitra <[email protected]>

* Added Loader for Webviews (Path-Check#206)

Co-authored-by: Harsh Vitra <[email protected]>

* Change color of three dot menu button to match the color of other button elements - Path-Check#178 (Path-Check#208)

* Migrating Bluetooth library to 0.0.5 (Path-Check#214)

* Add code formatting rules with git-hooks Path-Check#189 (Path-Check#210)

* Brazilian Portuguese language support (Path-Check#229)

* Dutch translation (Path-Check#225)

* Update index.js

* Update locationTracking.json

* Create overlap.json

* Andynuzzo/it (Path-Check#223)

* Update macos_build.yml (Path-Check#236)

Fix breaking gradle error

* Typo fix from Enrico Santus on latest (Path-Check#239)

* Add jest snapshot testing to the main views (Path-Check#187)

* Add jest snapshot testing to the main views

    This adds jest snapshot testing the main views for the application. The
    main views it covers are:

    * Export
    * Import
    * Licenses
    * LocationTracking
    * News
    * Overlap
    * Welcome

    The tests are run using `yarn test`.

    Mock setup has been added for some of the react native packages so the testing
    doesn't have to rely on the packages.

    Cleaned up some of the formatting in the language files to not include the trailing
    comma on the last property. This was throwing errors for some of the jest tests.

    Add jestSetupFile to setup some of the mocks for the tests

* Update tests after rebasing the develop branch

* Fix LICENSES json due to failing test

* Add mock for react-native-zip-archive

* Italian missing licenses file- Andy's translation added (Path-Check#241)

* Andy's translation for the missing licenses file

* Update index.js

* Add custom map styles to the Overlap map (Path-Check#246)

The custom styles were taken from https://snazzymaps.com/style/127403/no-label-bright-colors
which was linked to in the issue Path-Check#243

Closes Path-Check#243

* Haitian Creole with Translation Inputs from Gerald McElroy (Path-Check#238)

* Spanish language support based on Miquel Vila Porté's translation (Path-Check#245)

* Notification UI to show histogram and day wise list of intersections (Path-Check#237)

* Add News, Import, Export buttons

* add new colors

* add positive and sensitive buttons

* change button color in the main menu

* notification UI

* remove callback for button

* Fixed 'Always Allow' for iOS (Path-Check#97)

* 1. Added RN permissions to dependencies.
2. Added location permissions in AndroidManifest.xml

* 1. Permissions now handled by react-native-permissions
2. If platform is iOS 12.x.x or earlier. Directly acquire 'Always Allow' permission
3. If platform is iOS 13.0 or later, redirect to app settings.
Apps cannot directly ask for 'Always Allow' post iOS 13.

* Added comments

* Added yarn.lock and Podfile.lock to gitignore

* No changes

* Added lock files

* Removed Podfile.lock

Co-authored-by: Rich Paret <[email protected]>
Co-authored-by: Abhishek Singh <[email protected]>

* Change the ui of Notifications (Path-Check#254)

Co-authored-by: Harsh Vitra <[email protected]>

* Fix design and remove url (Path-Check#255)

Co-authored-by: Harsh Vitra <[email protected]>

* Cleanup react warning on the Overlap screen (Path-Check#249)

There were some react warnings being thrown due to the key
prop not being set on some components. This sets the key prop
on the components that are added in a loop

* Fixed text in the Notifications page (Path-Check#256)

* Fixed Text on Notifications page

* Fixed Font size of Export

Co-authored-by: Harsh Vitra <[email protected]>

* Update Export screen to show more accurate log data (Path-Check#244)

* Update Export screen to show more accurate log data

This is a pretty update to how the Export screen works and how the
log data is modified.

The Export screen component was rewritten as a functional component
in order to take advantage of hooks. The use for the hooks is to
update the log data details when the Export component comes in to
focus. The old version would only update the data once since the
component would mount and never unmount leading to stale data. The
new Export component will update the log details each time the view
comes in to focus. The log details have now been broken up in to
3 sections: Total time the log covers, Number of points logged, and
Time since last updated.

The LocationService has been updated with a new class called
LocationData. This take the old saveLocation method and makes it
an instance method on the LocationData class. This also allows
access to the location data that is in memory in order for the
Export screen to show more accurate details. The LocationService
has been updated to use this new class when saving the location
data.

* Revert change to the location time interval

* Remove old references to some variable names

* Fix export tests due to changes

* Add LocationData tests

* Remove old test file

* Change location marker and description, get rid of redundant markers as well (Path-Check#250)

* Add News, Import, Export buttons

* add new colors

* add positive and sensitive buttons

* change button color in the main menu

* change marker icon and description

* remove maps-clustering package

* Minor bug fixes in Share and Overlap features (Path-Check#265)

* Create Settings screen

* Add navigation and translation for new screen

* Remove irrelevant components from Settings screen

* Add menu for authorities selection in Settings

* Add stylized button, FlatList bit to Settings

* Add styling to flatlist rows, add close icon

* Fix caps, add iterating menu off authorities obj

* Add add/remove data source functions

* Add translation variables and lines to Settings

* Fix menu icon color from purple to bluish grey

* Remove unnecessary whitespace in translation

* Prevent duplicates from authorities list

* Add custom URL input (all function)

* Add check for connection, let user know if error

* Now pulls authorities list from internet source

* Store user settings in async storage

* Hopefully fix the git mess that somehow happened?

* Fix delay bug in async settings storage

* Fix null settings bug on fresh install

* Delete macos_build.yml

* Delete CONTRIBUTING.md

* fixed syntax error in gj labels block on dev, languages.js (Path-Check#318)

* Revert formatting changes

Co-authored-by: Sam Stowers <[email protected]>
Co-authored-by: Vitor Pamplona <[email protected]>
Co-authored-by: Steve Penrod <[email protected]>
Co-authored-by: Abhishek Singh <[email protected]>
Co-authored-by: Niels de Hoog <[email protected]>
Co-authored-by: Robert Gühne <[email protected]>
Co-authored-by: Tushar Dadlani <[email protected]>
Co-authored-by: Sagar Manohar <[email protected]>
Co-authored-by: Sagar Manohar <[email protected]>
Co-authored-by: Douglas Lara <[email protected]>
Co-authored-by: Greg Knaddison <[email protected]>
Co-authored-by: Tim Banks <[email protected]>
Co-authored-by: Rich Paret <[email protected]>
Co-authored-by: Harsh Vitra <[email protected]>
Co-authored-by: Harsh Vitra <[email protected]>
Co-authored-by: Parth Pathak <[email protected]>
Co-authored-by: alpita-masurkar <[email protected]>
Co-authored-by: Andy Nuzzo <[email protected]>
Co-authored-by: Nilay Kulkarni <[email protected]>
Co-authored-by: Steve Penrod <[email protected]>

* Update Entry.js

* Fix merge issues (Path-Check#330)

Co-authored-by: David Biga <[email protected]>
Co-authored-by: Steve Penrod <[email protected]>
Co-authored-by: Kyle Corbitt <[email protected]>
Co-authored-by: Sam Stowers <[email protected]>
Co-authored-by: Vitor Pamplona <[email protected]>
Co-authored-by: Niels de Hoog <[email protected]>
Co-authored-by: Robert Gühne <[email protected]>
Co-authored-by: Tushar Dadlani <[email protected]>
Co-authored-by: Sagar Manohar <[email protected]>
Co-authored-by: Sagar Manohar <[email protected]>
Co-authored-by: Douglas Lara <[email protected]>
Co-authored-by: Greg Knaddison <[email protected]>
Co-authored-by: Tim Banks <[email protected]>
Co-authored-by: Rich Paret <[email protected]>
Co-authored-by: Harsh Vitra <[email protected]>
Co-authored-by: Harsh Vitra <[email protected]>
Co-authored-by: Parth Pathak <[email protected]>
Co-authored-by: alpita-masurkar <[email protected]>
Co-authored-by: Andy Nuzzo <[email protected]>
Co-authored-by: Nilay Kulkarni <[email protected]>
Co-authored-by: Steve Penrod <[email protected]>
* Add News, Import, Export buttons

* add new colors

* add positive and sensitive buttons

* change button color in the main menu

* Add Settings Screen - Path-Check#150 (Path-Check#160)

* Remove Additional Stop Location Recording

* Add Settings Screen

* Add Intersection of points download from authority (Path-Check#165)

With this PR the app now:

* Contacts each authority URL once every 12 hours
* Downloads intersection data from that authority
* Runs a simple point intersection against it
* Saves the exposure results in the CROSSED_PATHS storage array
* Still several things to do for an MVP, then more to optimize:

Authority cannot be edited yet (in Settings)
* No display of CROSSED_PATHS
* Only results from one Authority are saved
* Improve overlap calculation accuracy
* Optimize the intersection calculation

* Fix export issue

* remove duplicated code

* revert to latest overlap text

Co-authored-by: David Biga <[email protected]>
Co-authored-by: Steve Penrod <[email protected]>
* initial mapbox refactor

* first views and components reusable and responsive

* include user location point on mapbox map

* new styles

* added permission and overlap.

* More pages

* fix fonts

* change private kit to Spaced

* fix border

* buttons position

* full screen maps background
getting autocomplete address from google api
floating bottom area with toggle

* Titles fix

* refactor main page to functional component

* refactor LocationTracking to be the main screen, move most local state to LocationTracking and pass down

* fix typos in fonts

* refactor initial map center to use getCurrentLocation

* add text around stop logging app

* add jetifier as dev dep

* fix intro enable location

* Change in location close Icon and set srtyle of location list

* change intro pages

* change naming of screens

* initial implementation of places

* fixes intro screen fixes

* clean up mapview and search addres

* change from react-native-dotenv to react-native-config

* remove release signing, will be done on app center

* fix typo

* ios project changes

* config

* help & information panel on main screen

* base modal for blacklist and activity log

* initial activity log

* Bug solve(Close button on search view)

* blacklist component and page

* location service

* blacklistmodal

* use searchedResult vs predictions

* fix search style and exiting

* fix search elevation

* save the result when a modal close

* breakout bottom panel and modals

* remove unused imports

* fix Blacklist address banning

* set values when removing home / work blacklist

* activity log modal

* activity log edits + move to own component

* add sample data for interactions for now until there's actual data

* android text input issue

* search input bar issue

* placeholder text of search, move around code order

* clean up unused pages

* change navigate after enabling location

* remove safeareaview from onboarding

* change the font

* onboarding page

* fix going to home screen without location enabled

* remove constants, fix infinite rerendering

* input box issue

* fix podfile

Co-authored-by: penchochris <[email protected]>
Co-authored-by: Anil Nakum <[email protected]>
Co-authored-by: ar910423 <[email protected]>
@ghost
Copy link

ghost commented Apr 7, 2020

Congratulations 🎉. DeepCode analyzed your code in 0.002 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard

@p0x6 p0x6 merged commit 9b0fcb9 into master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.