Here is an idea for combining transit with ride-share: transit companies can offer free passes to passengers in exchange for a certain number of ride-shares (or passenger time) in those passengers' automobiles. Participating passengers use a gps-app so that the system software can offer rides to passengers along the route being driven by the ride-share drivers.
For drivers: drivers would need to keep the app on for a specified amount of time per month to qualify for the free transit pass. They would not be required to deviate from their route. Ride-hailing passengers would need to select rides at pick-up points (bus stops) along the driver's normal route. Drivers may need to notify the system of their destination if they're making a trip that's not part of a regular commuting pattern.
For passengers: passengers would be able to enter a destination and would get a list of potentially compatible rides. Some routes may be more helpful than others. It is up to the passenger to decide whether to accept a ride given the amount of walking to and from the route.
In this way, drivers are encouraged to use public transit by getting free passes, while passengers gain access to more schedule- and routing- flexibility according to the routes being driven by participating drivers. Do you think this is a good/viable idea? Are there aspects you would add? Do you have other ideas for combining transit with ride-sharing that are different than this one?