Git Product home page Git Product logo

macstransitapp's Introduction

MACS Transit Android App

Production Build Status Open Testing Build Status

This is the source code for the dedicated bus tracker app for android devices for the MACS Transit system in Fairbanks, Alaska. This project was originally intended as an entry for the AK Dev alliance Hackathon in 2019, but development has continued after the event finalized.

Features

  • Track MACS Buses in real time!
  • Track only the routes you care about
  • See when buses are predicted to arrive at a stop
  • Optional dark theme

Contributing

See the file marked CONTRIBUTING, and be sure to read the Contributor Covenant Code of Conduct.

The source code beings at app/src/main/java/fnsb/macstransit/.

License

This project is unlicensed!

See the LICENSE file for details.

Disclaimer(s)

MACS (Metropolitan Area Commuter System) Transit is not affiliated with the MACSTransitApp or its contributors, and is Copyright ยฉ 2015 FNSB - All Rights Reserved.

RouteMatch, and RouteMatch Software is not affiliated with the MACSTransitApp or its contributors, and is Copyright ยฉ 2021 Routematch Software - All Rights Reserved.

macstransitapp's People

Contributors

scifi6546 avatar yespud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

macstransitapp's Issues

Bug: Rotating the app clears enabled routes.

Describe the bug
When rotating the device it clears whatever routes are enabled.

Toggling the routes off then back on does not fix the issue.

The only way to fix the issue is to restart the app.

To Reproduce

  1. Launch the app
  2. Once you get the maps activity simply rotate the device.

Expected behavior
Rotating the device should not clear the selected routes.

Smartphone (please complete the following information):

  • Device: Emulator
  • OS: API 21
  • App version Release 1.2.3

Bug: App locks up in background

Describe the bug
Threads don't resume when transitioning from the background to the foreground.

To Reproduce
Have routes selected, and then have the app go to a background state.

Expected behavior
Should resume once in the foreground.

Smartphone (please complete the following information):

  • Device: OnePlus 6T
  • OS: Android Pie
  • App version Release 1.1

Remove capacity

The current capacity is usually never accurate, and not all that useful, so just remove it.

Bug: Crash on SettingsActivity.addToFavoritesContainer()

Stacktrace

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3488)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3635)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:83)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2175)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loop (Looper.java:237)
  at android.app.ActivityThread.main (ActivityThread.java:7860)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1068)
Caused by: java.lang.NullPointerException: 
  at fnsb.macstransit.Activities.SettingsActivity.addToFavoritesContainer (SettingsActivity.java:148)
  at fnsb.macstransit.Activities.SettingsActivity.onCreate (SettingsActivity.java:108)
  at android.app.Activity.performCreate (Activity.java:7955)
  at android.app.Activity.performCreate (Activity.java:7944)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1307)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3463)

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A01
  • OS: Android 10
  • App version: Release 1.2.4

Additional context
Information gathered form google play console

Crash: java.lang.NullPointerException

java.lang.NullPointerException: 
  at fnsb.macstransit.Activities.SplashActivity.mapSharedStops (SplashActivity.java:390)
  at fnsb.macstransit.Activities.SplashActivity.lambda$initializeApp$2$SplashActivity (SplashActivity.java:238)
  at fnsb.macstransit.Activities.-$$Lambda$SplashActivity$xNErhH98EIEoVbfYi0xMg4I3hmE.run (Unknown Source:2)
  at java.lang.Thread.run (Thread.java:923)

Draw the selected bus routes via Polylines

Make this a toggle-able option though, as this can use extra processing power and potentially data, and may add extra stuff to the screen that the end user may not want.

Feature: Network timeout change

Describe the feature you'd like to see added
Looking into the response times for masterRoute (https://fnsb.routematch.com/feed/masterRoute/) it seems that average response times take about a minute to come through.

Becasue of this the timeout should be changed to 70 seconds, and maybe even have an option to run without a timeout (for initialization requests).

Bug: Misleading splash screen

Describe the bug
When the RouteMatch server times out, it reports that there is no schedule for the day, when it really should just say that the server timed out (and the app is going to retry after some time).

This is a bug because it's considered misleading, and cost me 2 stars on the Google Play Store.

Feature: Favorites

Have an option in the settings that allows the user to add/"favorite" bus routes.

These routes will (try to) be enabled on startup.

Add unit tests to app

Because of the various functions within the app, add unit tests to check that everything is working as intended

Feature: Hide buses instead

When loading the buses and stops, just hide the buses and stops if they are not selected.

While hidden still update the bus position (via #50 ).

Menu doesn't work

When the menu is clicked, and an option is selected it doesn't actually select the option. It also closes immediately after.

Why is this still an issue, it shouldn't take 3 days to design a menu REEEEEEEEEEEEEEEEE

Phantom markers

When de-selecting a route from the menu, it may disappear, only to reappear, but not update position or be included in any of the arrays.

Seems to happen when the route is de-selected near the end of the timeout of the update loop

App hangs when selecting a stop

The app hangs when a stop is selected.

Upon further investigation this appears to be because its trying to load data from the network thread on the UI thread, and thus hangs the UI until its completed.

Replace bus markers with custom markers

This is to be done WAYYYYYYYYYYYYYY down the road in the very distant future, but make custom markers for the buses and bus stops, that way I can get around the 10 color limit with google maps markers, as well as utilize the heading which is already accounted for and parsed.

App hangs from loading data

Whenever the app is opened, and it starts to get data from the master schedule, as well as the routes, it has to wait for this to be completed. As a result, the app hangs on the home-screen for a few seconds, which can lock up the device as a whole.

Feature: Move project to Kotlin

It appears Google is moving away from Java as their preferred language and are embracing kotlin for the foreseeable future. To better future proof the app, it should be moved to kotlin.

Bug: Time shown around noon is wrong on 12 hour mode

Describe the bug
When on 12 hour mode, noon is shown as 0:xx AM

To Reproduce
Steps to reproduce the behavior:

  1. Click on stop that has one around noon
  2. Observe that the time is wrong

Expected behavior
It should display 12:xx PM

Screenshots
Screenshot_1580761302

Smartphone (please complete the following information):

  • Device: OnePlus 5T
  • OS: Android Pie
  • App version: Release 1.0

App crashes on launch

Beta 2 has a bug where the app crashes as soon as it's opened when the buses are in service

Crash: java.lang.NullPointerException

java.lang.NullPointerException: 
  at fnsb.macstransit.Threads.UpdateThread.lambda$getNewThread$0$UpdateThread (UpdateThread.java:114)
  at fnsb.macstransit.Threads.-$$Lambda$UpdateThread$Sq-KHA6lr4xd_T_bmO45KGCCNZU.run (Unknown Source:2)
  at java.lang.Thread.run (Thread.java:919)
java.lang.NullPointerException: 
  at fnsb.macstransit.Threads.UpdateThread.lambda$getNewThread$0$UpdateThread (UpdateThread.java:114)
  at fnsb.macstransit.Threads.-$$Lambda$UpdateThread$Sq-KHA6lr4xd_T_bmO45KGCCNZU.run (Unknown Source:2)
  at java.lang.Thread.run (Thread.java:923)

Bug: Reloading maps view causes favorited routes to be selected regardless of menu check

Describe the bug
Whatever routes are favorited are selected upon loading the MapsActivity (like from returning from the SettingsActivity, or going to the home screen, and returning the app). When doing so the checkboxes in the dropdown are not updated correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Launch the app with favorite routes.
  2. Change which routes are selected from the drop-down menu.
  3. Go to a different view/activity.
  4. Return to the MapsActivity.
  5. Notice how the selected routes have seemingly re-enabled favorited routes, but not selected them from the drop-down.

Expected behavior
Favorite routes should only be pre-selected upon the first load coming from SplashActivity.

Smartphone (please complete the following information):

  • Device: OnePlus 5T
  • OS: Android 10.
  • App version: Release 1.2.2

Bug: Splashscreen is displayed incorrectly in landscape mode

Describe the bug
The progress bar (and potentially button), and icon are all squished in landscape mode

Screenshots
Screenshot_1595299245

Smartphone (please complete the following information):

  • Device: OnePlus 5T & Emulator
  • OS: Android 10 & Android 4.4 (Kitkat)
  • App version Release 1.1.1 & Release 1.2

Feature: New settings page

With the addition of #49 and #52 , the settings page should be redone to support more options (and apply the changed effects immediately).

Bug: Crash on internet check

Describe the bug
Internet check is run on the wrong thread

Stacktrace

android.view.ViewRootImpl$CalledFromWrongThreadException: 
  at android.view.ViewRootImpl.checkThread (ViewRootImpl.java:10689)
  at android.view.ViewRootImpl.focusableViewAvailable (ViewRootImpl.java:5556)
  at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java:980)
  at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java:980)
  at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java:980)
  at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java:980)
  at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java:980)
  at android.view.ViewGroup.focusableViewAvailable (ViewGroup.java:980)
  at android.view.View.setFlags (View.java:17519)
  at android.view.View.setVisibility (View.java:12466)
  at fnsb.macstransit.Activities.SplashActivity.noInternet (SplashActivity.java:269)
  at fnsb.macstransit.Activities.SplashActivity.lambda$initializeApp$1$SplashActivity (SplashActivity.java:187)
  at fnsb.macstransit.Activities.-$$Lambda$SplashActivity$9fgt2V7Vh-rdwJaLbP5w-ufGtyg.run (Unknown Source:2)
  at java.lang.Thread.run (Thread.java:923)

Smartphone (please complete the following information):

  • Device: Samsung Galaxy Note20 5G and Samsung Galaxy S10+
  • OS: Android 11
  • App version: Release 1.2.4

Additional context
Crash obtained though Google Play Console

Feature: [Collectable Badges]

Add an ability to collect badges, for example:

  • Rode the red line 69 times
  • Rode every color of the rainbow in order, as a busline in one day
  • rode the bus without paying your fare, bad boy
  • Rode from UAF to North Pole and then back 24 hours later. Survive in North Pole for a night!!
  • rode the bus at -40* or colder!!

Add fares for the buses

Since buses have fares for riding, add those to the app.

This data can be pulled directly from the MACS website.

Add documentation

Replace all the TODO Documentation with actual good relevant documentation

Menu should stay open

Currently it closes after an option has been selected.

Turns out a bunch of people want it to stay open....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.