├── settings.gradle ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── refs.xml │ │ │ │ ├── ids.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── attrs.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── group.png │ │ │ │ ├── ic_car.png │ │ │ │ ├── ic_call.png │ │ │ │ ├── icondrive.png │ │ │ │ ├── right_arrow.png │ │ │ │ ├── ic_map_marker.png │ │ │ │ ├── ios_checkmark.png │ │ │ │ ├── car_marker_dark.png │ │ │ │ ├── directions_icon.png │ │ │ │ ├── ic_right_arrow.png │ │ │ │ ├── ic_source_marker.png │ │ │ │ ├── icon_drive_base.png │ │ │ │ ├── profile_avatar.png │ │ │ │ ├── directions_button.png │ │ │ │ ├── icn_titlebar_close.png │ │ │ │ ├── icon_drive_pointer.png │ │ │ │ ├── ic_destination_marker.png │ │ │ │ ├── ic_location_default.png │ │ │ │ ├── ic_location_pressed.png │ │ │ │ ├── iconmap_marker_filled.png │ │ │ │ └── icon_drive_base_transparent.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── group.png │ │ │ │ ├── ic_call.png │ │ │ │ ├── ic_car.png │ │ │ │ ├── icondrive.png │ │ │ │ ├── right_arrow.png │ │ │ │ ├── car_marker_dark.png │ │ │ │ ├── directions_icon.png │ │ │ │ ├── ic_map_marker.png │ │ │ │ ├── ic_right_arrow.png │ │ │ │ ├── icon_drive_base.png │ │ │ │ ├── ios_checkmark.png │ │ │ │ ├── profile_avatar.png │ │ │ │ ├── directions_button.png │ │ │ │ ├── ic_source_marker.png │ │ │ │ ├── ic_location_default.png │ │ │ │ ├── ic_location_pressed.png │ │ │ │ ├── icn_titlebar_close.png │ │ │ │ ├── icon_drive_pointer.png │ │ │ │ ├── ic_destination_marker.png │ │ │ │ ├── iconmap_marker_filled.png │ │ │ │ └── icon_drive_base_transparent.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── group.png │ │ │ │ ├── ic_car.png │ │ │ │ ├── ic_call.png │ │ │ │ ├── icondrive.png │ │ │ │ ├── right_arrow.png │ │ │ │ ├── ic_map_marker.png │ │ │ │ ├── ic_right_arrow.png │ │ │ │ ├── ios_checkmark.png │ │ │ │ ├── profile_avatar.png │ │ │ │ ├── background_login.png │ │ │ │ ├── car_marker_dark.png │ │ │ │ ├── directions_icon.png │ │ │ │ ├── ic_source_marker.png │ │ │ │ ├── icon_drive_base.png │ │ │ │ ├── natural_resource.png │ │ │ │ ├── directions_button.png │ │ │ │ ├── ic_location_default.png │ │ │ │ ├── ic_location_pressed.png │ │ │ │ ├── icn_titlebar_close.png │ │ │ │ ├── icon_drive_pointer.png │ │ │ │ ├── ic_destination_marker.png │ │ │ │ ├── iconmap_marker_filled.png │ │ │ │ └── icon_drive_base_transparent.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── group.png │ │ │ │ ├── ic_call.png │ │ │ │ ├── ic_car.png │ │ │ │ ├── icondrive.png │ │ │ │ ├── ic_map_marker.png │ │ │ │ ├── ios_checkmark.png │ │ │ │ ├── right_arrow.png │ │ │ │ ├── car_marker_dark.png │ │ │ │ ├── directions_icon.png │ │ │ │ ├── ic_right_arrow.png │ │ │ │ ├── icon_drive_base.png │ │ │ │ ├── profile_avatar.png │ │ │ │ ├── directions_button.png │ │ │ │ ├── ic_source_marker.png │ │ │ │ ├── icon_drive_pointer.png │ │ │ │ ├── ic_location_default.png │ │ │ │ ├── ic_location_pressed.png │ │ │ │ ├── ic_destination_marker.png │ │ │ │ ├── iconmap_marker_filled.png │ │ │ │ └── icon_drive_base_transparent.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_registration.xml │ │ │ │ ├── fragment_permissions.xml │ │ │ │ ├── info_window_from.xml │ │ │ │ ├── info_window_to.xml │ │ │ │ ├── snackbar_choose_dest.xml │ │ │ │ ├── fragment_map.xml │ │ │ │ ├── fragment_role_registration.xml │ │ │ │ ├── snackbar_driver_info.xml │ │ │ │ ├── notification_item.xml │ │ │ │ ├── user_info.xml │ │ │ │ ├── snackbar_state.xml │ │ │ │ ├── fragment_name_registration.xml │ │ │ │ ├── dialog_accept_ride.xml │ │ │ │ ├── activity_launcher.xml │ │ │ │ ├── snackbar_book_ride.xml │ │ │ │ ├── snackbar_trip_end_info.xml │ │ │ │ └── snackbar_order_info.xml │ │ │ ├── drawable │ │ │ │ ├── divider.xml │ │ │ │ ├── ic_location.xml │ │ │ │ ├── elevation.xml │ │ │ │ ├── bg_button_red.xml │ │ │ │ ├── bg_dialogs.xml │ │ │ │ ├── bg_popup.xml │ │ │ │ ├── bg_text.xml │ │ │ │ ├── bg_popup_black.xml │ │ │ │ ├── bg_button.xml │ │ │ │ ├── bg_button_black.xml │ │ │ │ ├── bg_button_white.xml │ │ │ │ ├── bg_ridehole.xml │ │ │ │ ├── bg_text_left.xml │ │ │ │ ├── bg_popup_bottom.xml │ │ │ │ ├── bg_snackbar.xml │ │ │ │ ├── bg_snackbar_header.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── hypertrack │ │ │ │ └── ridesharing │ │ │ │ ├── MySharedPreferences.java │ │ │ │ ├── parsers │ │ │ │ ├── Parser.java │ │ │ │ ├── UserParser.java │ │ │ │ └── OrderParser.java │ │ │ │ ├── utils │ │ │ │ ├── HyperTrackUtils.java │ │ │ │ ├── TextFormatUtils.java │ │ │ │ └── MapUtils.java │ │ │ │ ├── models │ │ │ │ ├── Car.java │ │ │ │ ├── User.java │ │ │ │ ├── Place.java │ │ │ │ └── Order.java │ │ │ │ ├── PermissionsFragment.java │ │ │ │ ├── views │ │ │ │ ├── Dialog.java │ │ │ │ ├── SnackbarContentLayout.java │ │ │ │ └── Snackbar.java │ │ │ │ ├── FirebaseFirestoreApi.java │ │ │ │ ├── MyDeviceUpdatesHandler.java │ │ │ │ ├── RoleRegistrationFragment.java │ │ │ │ ├── NameRegistrationFragment.java │ │ │ │ ├── LauncherActivity.java │ │ │ │ ├── tracking │ │ │ │ ├── MapViewsPresenter.java │ │ │ │ └── TrackingPresenter.java │ │ │ │ ├── components │ │ │ │ ├── MainActivity.java │ │ │ │ ├── rider │ │ │ │ │ └── RiderMapFragment.java │ │ │ │ └── driver │ │ │ │ │ └── DriverMapFragment.java │ │ │ │ ├── adapters │ │ │ │ ├── OrdersAdapter.java │ │ │ │ └── MapInfoWindowAdapter.java │ │ │ │ └── RegistrationActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── hypertrack │ │ │ └── ridesharing │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── hypertrack │ │ └── ridesharing │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── Images ├── Demo.gif ├── Architecture.png └── ArchitectureUpdated.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── vcs.xml ├── misc.xml ├── runConfigurations.xml ├── gradle.xml └── codeStyles │ └── Project.xml ├── .gitignore ├── LICENSE ├── gradle.properties ├── gradlew.bat └── gradlew /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | google-services.json -------------------------------------------------------------------------------- /Images/Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/Images/Demo.gif -------------------------------------------------------------------------------- /app/src/main/res/values/refs.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Images/Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/Images/Architecture.png -------------------------------------------------------------------------------- /Images/ArchitectureUpdated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/Images/ArchitectureUpdated.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/group.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_car.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/group.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_call.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_call.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_car.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/group.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_car.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/group.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/icondrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/icondrive.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icondrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/icondrive.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_call.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icondrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/icondrive.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_call.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_car.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_map_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_map_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ios_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ios_checkmark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/icondrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/icondrive.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/car_marker_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/car_marker_dark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/directions_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/directions_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_source_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_source_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/icon_drive_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/icon_drive_base.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/profile_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/profile_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/car_marker_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/car_marker_dark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/directions_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/directions_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_map_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_map_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_drive_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/icon_drive_base.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ios_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ios_checkmark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/profile_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/profile_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_map_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_map_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ios_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ios_checkmark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/profile_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/profile_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_map_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_map_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ios_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ios_checkmark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/directions_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/directions_button.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/icn_titlebar_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/icn_titlebar_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/icon_drive_pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/icon_drive_pointer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/directions_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/directions_button.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_source_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_source_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/background_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/background_login.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/car_marker_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/car_marker_dark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/directions_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/directions_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_source_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_source_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_drive_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/icon_drive_base.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/natural_resource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/natural_resource.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/car_marker_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/car_marker_dark.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/directions_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/directions_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/icon_drive_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/icon_drive_base.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/profile_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/profile_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_destination_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_destination_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_location_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_location_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_location_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/ic_location_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/iconmap_marker_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/iconmap_marker_filled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_location_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_location_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_location_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_location_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icn_titlebar_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/icn_titlebar_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_drive_pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/icon_drive_pointer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/directions_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/directions_button.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_location_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_location_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_location_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_location_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icn_titlebar_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/icn_titlebar_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_drive_pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/icon_drive_pointer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/directions_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/directions_button.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_source_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_source_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/icon_drive_pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/icon_drive_pointer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_destination_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/ic_destination_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/iconmap_marker_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/iconmap_marker_filled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_destination_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/ic_destination_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/iconmap_marker_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/iconmap_marker_filled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_location_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_location_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_location_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_location_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_destination_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_destination_marker.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/iconmap_marker_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/iconmap_marker_filled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/icon_drive_base_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-hdpi/icon_drive_base_transparent.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_drive_base_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xhdpi/icon_drive_base_transparent.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_drive_base_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxhdpi/icon_drive_base_transparent.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/icon_drive_base_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypertrack/ridesharing-android/HEAD/app/src/main/res/drawable-xxxhdpi/icon_drive_base_transparent.png -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | /firebase 15 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Nov 05 11:25:47 EET 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_location.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/elevation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_dialogs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_popup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_popup_black.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_black.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_ridehole.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_text_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 16dp 4 | 100dp 5 | 220dp 6 | 250dp 7 | 250dp 8 | 4dp 9 | 4dp 10 | 11 | -------------------------------------------------------------------------------- /app/src/test/java/com/hypertrack/ridesharing/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_registration.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_popup_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_snackbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/MySharedPreferences.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing; 2 | 3 | import android.content.Context; 4 | 5 | public class MySharedPreferences { 6 | public static final String USER_KEY = "user"; 7 | public static final String ORDER_KEY = "order"; 8 | public static final String TRIP_KEY = "trip"; 9 | 10 | public static android.content.SharedPreferences get(Context context) { 11 | return context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_snackbar_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_permissions.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #50e3c2 4 | #1dc28c 5 | #D81B60 6 | #000000 7 | #ffffff 8 | #b7b7b7 9 | 10 | #66000000 11 | #ffffff 12 | #000000 13 | #f8f9fa 14 | 15 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/hypertrack/ridesharing/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.hypertrack.uberx", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/parsers/Parser.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.parsers; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.annotation.Nullable; 5 | 6 | import com.fasterxml.jackson.databind.ObjectMapper; 7 | import com.google.firebase.firestore.DocumentSnapshot; 8 | import com.google.firebase.firestore.QuerySnapshot; 9 | 10 | import java.text.SimpleDateFormat; 11 | import java.util.List; 12 | import java.util.Locale; 13 | 14 | public abstract class Parser { 15 | 16 | public static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; 17 | 18 | final SimpleDateFormat dateFormat; 19 | 20 | ObjectMapper mapper = new ObjectMapper(); 21 | 22 | public Parser() { 23 | dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.getDefault()); 24 | } 25 | 26 | @NonNull 27 | abstract List parse(QuerySnapshot querySnapshot); 28 | 29 | @Nullable 30 | abstract T parse(DocumentSnapshot doc); 31 | } 32 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | 23 | # Keep model classes to preserve the field names consistency across versions 24 | -keep class com.hypertrack.ridesharing.models.** { *; } 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/info_window_from.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/info_window_to.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 28 | 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 HyperTrack 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/utils/HyperTrackUtils.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.utils; 2 | 3 | import android.content.Context; 4 | import android.content.pm.ApplicationInfo; 5 | import android.content.pm.PackageManager; 6 | import android.text.TextUtils; 7 | 8 | 9 | public class HyperTrackUtils { 10 | private static String HYPERTRACK_PUB_KEY; 11 | 12 | public static String getPubKey(Context context) { 13 | if (TextUtils.isEmpty(HYPERTRACK_PUB_KEY)) { 14 | try { 15 | ApplicationInfo app = context.getPackageManager() 16 | .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); 17 | HYPERTRACK_PUB_KEY = app.metaData.getString("com.hypertrack.sdk.PUB_KEY"); 18 | } catch (PackageManager.NameNotFoundException e) { 19 | e.printStackTrace(); 20 | } 21 | } 22 | if (TextUtils.isEmpty(HYPERTRACK_PUB_KEY)) { 23 | throw new IllegalArgumentException("There is not HyperTrack PUB_KEY in manifest"); 24 | } 25 | return HYPERTRACK_PUB_KEY; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/parsers/UserParser.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.parsers; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.annotation.Nullable; 5 | 6 | import com.google.firebase.firestore.DocumentSnapshot; 7 | import com.google.firebase.firestore.QueryDocumentSnapshot; 8 | import com.google.firebase.firestore.QuerySnapshot; 9 | import com.hypertrack.ridesharing.models.User; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | public class UserParser extends Parser { 15 | 16 | @NonNull 17 | @Override 18 | public List parse(QuerySnapshot querySnapshot) { 19 | List users = new ArrayList<>(); 20 | if (querySnapshot != null) { 21 | for (QueryDocumentSnapshot doc : querySnapshot) { 22 | users.add(parse(doc)); 23 | } 24 | } 25 | return users; 26 | } 27 | 28 | @Nullable 29 | @Override 30 | public User parse(DocumentSnapshot doc) { 31 | if (doc.getData() != null) { 32 | User user = mapper.convertValue(doc.getData(), User.class); 33 | user.id = doc.getId(); 34 | return user; 35 | } 36 | return null; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/parsers/OrderParser.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.parsers; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.annotation.Nullable; 5 | 6 | import com.google.firebase.firestore.DocumentSnapshot; 7 | import com.google.firebase.firestore.QueryDocumentSnapshot; 8 | import com.google.firebase.firestore.QuerySnapshot; 9 | import com.hypertrack.ridesharing.models.Order; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | public class OrderParser extends Parser { 15 | 16 | @NonNull 17 | @Override 18 | public List parse(QuerySnapshot querySnapshot) { 19 | List orders = new ArrayList<>(); 20 | if (querySnapshot != null) { 21 | for (QueryDocumentSnapshot doc : querySnapshot) { 22 | orders.add(parse(doc)); 23 | } 24 | } 25 | return orders; 26 | } 27 | 28 | @Nullable 29 | @Override 30 | public Order parse(DocumentSnapshot doc) { 31 | if (doc.getData() != null) { 32 | Order order = mapper.convertValue(doc.getData(), Order.class); 33 | order.id = doc.getId(); 34 | return order; 35 | } 36 | return null; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/models/Car.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.models; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonProperty; 8 | 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | public class Car implements Parcelable { 11 | 12 | public String model; 13 | @JsonProperty("license_plate") 14 | public String licensePlate; 15 | 16 | @Override 17 | public int describeContents() { 18 | return 0; 19 | } 20 | 21 | @Override 22 | public void writeToParcel(Parcel dest, int flags) { 23 | dest.writeString(this.model); 24 | dest.writeString(this.licensePlate); 25 | } 26 | 27 | public Car() { 28 | } 29 | 30 | protected Car(Parcel in) { 31 | this.model = in.readString(); 32 | this.licensePlate = in.readString(); 33 | } 34 | 35 | public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { 36 | @Override 37 | public Car createFromParcel(Parcel source) { 38 | return new Car(source); 39 | } 40 | 41 | @Override 42 | public Car[] newArray(int size) { 43 | return new Car[size]; 44 | } 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/PermissionsFragment.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing; 2 | 3 | import android.Manifest; 4 | import android.annotation.SuppressLint; 5 | import android.os.Bundle; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import androidx.annotation.NonNull; 11 | import androidx.annotation.Nullable; 12 | import androidx.core.app.ActivityCompat; 13 | import androidx.fragment.app.Fragment; 14 | 15 | import com.hypertrack.ridesharing.components.MainActivity; 16 | 17 | public class PermissionsFragment extends Fragment { 18 | 19 | @SuppressLint("InflateParams") 20 | @Nullable 21 | @Override 22 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 23 | return inflater.inflate(R.layout.fragment_permissions, null); 24 | } 25 | 26 | @SuppressWarnings("ConstantConditions") 27 | @Override 28 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 29 | super.onViewCreated(view, savedInstanceState); 30 | 31 | ActivityCompat.requestPermissions(getActivity(), new String[]{ 32 | Manifest.permission.ACCESS_FINE_LOCATION, 33 | }, MainActivity.REQUEST_ACCESS_FINE_LOCATION); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/snackbar_choose_dest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 18 | 19 | 25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/utils/TextFormatUtils.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.utils; 2 | 3 | import android.content.Context; 4 | import android.text.Html; 5 | import android.text.Spanned; 6 | import android.text.format.DateUtils; 7 | 8 | import com.hypertrack.ridesharing.R; 9 | import com.hypertrack.ridesharing.models.Order; 10 | 11 | import java.util.concurrent.TimeUnit; 12 | 13 | public class TextFormatUtils { 14 | 15 | public static String getRelativeDateTimeString(Context context, long time) { 16 | return DateUtils.getRelativeDateTimeString(context, time, 17 | TimeUnit.MINUTES.toMillis(1), TimeUnit.DAYS.toMillis(7), 18 | DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | 19 | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_WEEKDAY | 20 | DateUtils.FORMAT_ABBREV_ALL).toString(); 21 | } 22 | 23 | public static Spanned getDestinationName(Context context, Order order) { 24 | boolean isPickup = Order.PICKING_UP.equals(order.status) 25 | || Order.REACHED_PICKUP.equals(order.status); 26 | String address = isPickup ? order.pickup.address : order.dropoff.address; 27 | String text = isPickup ? context.getString(R.string.address_pickup) : context.getString(R.string.address_dropoff); 28 | return Html.fromHtml(String.format(text, address)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/hypertrack/ridesharing/views/Dialog.java: -------------------------------------------------------------------------------- 1 | package com.hypertrack.ridesharing.views; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import androidx.annotation.NonNull; 7 | 8 | import com.hypertrack.ridesharing.R; 9 | 10 | public class Dialog extends android.app.Dialog { 11 | 12 | public Dialog(@NonNull Context context, int layoutResID) { 13 | super(context, R.style.DialogTheme); 14 | setContentView(layoutResID); 15 | } 16 | 17 | @NonNull 18 | public Dialog setAction(final View.OnClickListener listener) { 19 | View view = findViewById(R.id.ht_action); 20 | if (view != null) { 21 | if (listener != null) { 22 | view.setVisibility(View.VISIBLE); 23 | view.setOnClickListener(new View.OnClickListener() { 24 | public void onClick(View view) { 25 | listener.onClick(view); 26 | } 27 | }); 28 | } else { 29 | view.setVisibility(View.GONE); 30 | view.setOnClickListener(null); 31 | } 32 | } 33 | 34 | return this; 35 | } 36 | 37 | @NonNull 38 | public Dialog setAction(int viewId, final View.OnClickListener listener) { 39 | View view = findViewById(viewId); 40 | if (view != null) { 41 | view.setOnClickListener(listener); 42 | } 43 | 44 | return this; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_map.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | 17 | 22 | 23 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_role_registration.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 21 | 22 |