image provider

Distracted Driving


This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.

Please do not email me about this project without reading the disclaimer above.


This is a project for someone with an interest in safety. Distracted driving has surpassed drunk driving as the cause of accidents and deaths. The big problem is people don’t see it as dangerous. People refuse to stop doing it. It is also hard for police to detect.

Your job is to write a cell-phone app that prevents a cellphone from distracting a driver. Basically it uses the built-in GPS (Global Positioning System) to tell if the vehicle is moving. If it is, it shuts down the phone, even the clock. To use the phone you must pull over and stop the vehicle. You might write it in Java for the Android cell phones or Objective-C for the iPhones.

How It Works

While the vehicle is moving, there are a few exceptions to the shutdown.

Ideally the unit should also shut off the phone while you are at a stop light. A clever phone might be able to tell the difference between pulling over and stopping at a light. Consumers would not put up with the phone staying off for a minute after pulling over.

There is thus no temptation to look at your cellphone while you are driving. Even to find out the time or to find out who a call was from you still have to pull over.

Eventually people convicted of distracted driving could be forced to install the app in a tamper-proof way. It could even become mandatory for every cell phone to come with your app built-in.


The app uses GPS to determine when you are driving or cycling. It can tell driving that apart from sitting, walking or cycling by speed. It then automatically puts your cellphone into some sort of suspended mode where it does not accept incoming calls and does not notify you of incoming text. Neither does it let you text or make outgoing calls. When you stop the car for X seconds, the phone wakes up and lets you know about missed calls and text messages.

You do not want people able to disable the app, but there should be some way to uninstall it. The uninstall might contain a deliberate delay to discourage people overriding it.

I have never written such an suspend-wake app, so I have no idea if the Android OS (Operating System) or iPhone OS has the necessary hooks to let you do this. You are on your own to experiment.

You could also configure it to turn off when cycling or walking, or an a cyclical basis when sitting so you are not constantly at the mercy of your phone.

You might also teach your app to recognise other forms of transport such as bus, train, ferry, airplane, helijet and behave appropriately.


This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number