You could probably figure out if you're dangling without a dongle by using your accelerometer. The key would be to see if there is any measurable difference between your pace when your fly is zipped versus when unzipped. You may need to get seed data by walking around a bit in either state in each of your pants. If it's precise enough, it could then detect which pants you are wearing and the state of the fly based on differences in your movement. If it's not quite there yet, the user could just select pants at the start of the day to use the right data set.
There you go. Build your company.