It's not nice to fool your activity tracker, and it's not likely to last long either.

Activity trackers are becoming more common every day. Most are cellphone apps that can tell how much time you spend sitting, walking or running, as well as how many steps you've taken, how many calories you've burned and other types of useful information. Others are wearable devices, often bracelets, which are designed solely to track activity and are often used in medical or scientific studies.

Neither is foolproof. People can trick them.

Attaching your phone to your dog while you sit and sip piña coladas or watch reruns on TV will fool even the reprogrammed trackers.

Who would want to fool an activity tracker? Aside from the fun of outwitting a machine or piece of programming, some people have a lot to gain by deceiving them. There are insurance companies that offer discounts to tracked customers who are physically active. So appearing to be moving when you're actually sitting can save you money. And all you have to do is shake your smartphone while you're sitting on the couch and watching TV.

Fourteen people in a recent study did their best to trick an activity tracker into thinking they were sitting while they were walking or walking while they were sitting. Ten of them succeeded at least once.

The goal of the study wasn't to fool the trackers, it was to teach the trackers how to spot cheating.

At the heart of most activity trackers are two devices, an accelerometer and a gyroscope. Together they measure movement. To them, when the phone is moving, it looks like the person is also moving.

People tried a variety of strategies to fool the trackers. To fake walking, the most common strategy was simply to shake the phone with their hands while sitting in a chair. To fake sitting while walking, the most common strategy was to walk very smoothly. Some people tried to walk with a pace different from their normal walking rhythm. Others tried to stifle the movement of the phone with their hands.

The phone would beep whenever it was able to detect the true activity, to alert the cheaters that a strategy was not working and that they should try something else.

The trackers were reprogrammed at various points in the study after they had been fooled. Basically this consisted of feeding a successful cheater's movement data back and instructing the app to pay attention — “this may look like walking but it is really sitting,” or vice versa.

The apps got much better at spotting cheaters. From an initial accuracy of 38% at the study's start, this rose to 84% at the end of the study.

Not only were the reprogrammed trackers better at spotting cheating by the person that had originally fooled them, they were also better at spotting the cheating by new people.

So there's little question that activity trackers can be made more accurate. Foolproof is another story. Attaching your phone to your dog while you sit and sip piña coladas or watch reruns on TV will fool even the reprogrammed trackers. It might take a hair and fibers department to sniff that trick out. The study authors also suggest taking the tracker for a spin in the dryer, though the heat might be a problem there.

But the next generation of activity trackers should be a lot smarter than the current one is.

An article on the study appears in PLOS ONE and is freely available.