Reliable crash data is essential to improving traffic safety. As part of a senior Capstone project at Olin College of Engineering, we have identified many holes in the current processes via user interviews and analysis of the crash data ecosystem. We chose a solution that we believed provided our team with the best opportunity for impact: improving crash data collection at the crash scene. Our solution, Ruina, is a mobile toolkit that provides police officers with an extensive set of tools allowing them to more accurately document a crash digitally and in a higher resolution manner. This toolkit manifested itself in a cross platform mobile application where officers could digitally document a crash using a tablet. Runia uses many technology features in mobile devices that aid officers in their ability to do their job such as the extensive sensor suite, camera, and internet connectivity. Ruina supports advanced camera and scanning features, aspects of location and scene diagramming, and full MMUCC compliance. The result of our semester of work is found in this repository as a proof of concept mobile application.
- Clone repo
- Navigate to branch or create new branch
- New features should be on a new branch with the name
feat/{FEATURE_NAME}
- Fixes should be on a new branch with the name
fix/{FIX_NAME}
- New features should be on a new branch with the name
Cd
into repo- Install/update all
node_modules
(ifyarn
is not recognized as a command then runnpm install -g yarn
orbrew install yarn
on a Mac)$ rm -rf node_modules/ && yarn install
- Rebuild cocaopods
$ cd ios/ $ pod install $ cd ..
- Start simulator
- For Android: either start an emulator from Android Studio or connect a device through usb, then run
$ npx react-native run-android
- For ios:
or to run on iPad$ npx react-native run-ios
You can also specify simulator device:$ npm run iPad
You can list which ios devices you have available using this command:$ npx react-native run-ios --simulator="{SIMULATOR_NAME}"
$ xcrun simctl list devices
- To launch Metro server CLI tool if it does not show up (Mac)
$ /path-to-this-repo/RuinaMain/node_modules/react-native/scripts/launchPackager.command
- Additional documentation can be found at Installation Instructions
- To run the jest tests for the first time, you need to add a few packages via
Run tests via
yarn add sinon enzyme enzyme-adapter-react-16 --dev npm install -g jest-cli
jest <input test filename>
Some weird issues encountered from running npx react-native run-android
-
Error: spawn ./gradlew EACCES at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
Solution: in root directory, run
chmod 755 android/gradlew
For more info, check this post.
-
Execution failed for task ':app:installDebug'. > java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE
Solution: in root directory run
adb uninstall com.ruina
For more info, check this post.