One of the unintended consequences of sending the United States military abroad is to promote illegal trafficking in wildlife. Young soldiers typically want souvenirs of their foreign service, and neither military patrol officers on bases abroad nor customs agents back home can usually tell whether, say, that fur hat is made from Eurasian lynx (illegal) or Corsac fox (not wonderful, but OK).

Heidi Kretser, a social scientist from the Wildlife Conservation Society, was living in upstate New York in 2008 when nearby Fort Drum was training and mobilizing 80,000 troops a year, many with deployments to Iraq and Afghanistan. She thought she could help with training programs, handouts, and a video about illegal wildlife products. But frequent turnover, especially among M.P.s, meant that it was difficult to train everyone, or make that training stick.

Later, she saw the problem firsthand in Afghanistan, where merchants coming onto military bases for weekly or monthly bazaars routinely sold fur coats from Eurasian lynx, skulls and horns of Marco Polo sheep, and even snow leopard pelts. Soldiers, contractors, and international aid workers also frequented the wildlife market known as “Chicken Street” in Kabul. Sweeps of bases by military police turned up hundreds of contraband wildlife products, and a survey back at Fort Drum found that 40 percent of soldiers had either purchased or seen other soldiers purchase wildlife products while abroad.

To help fix the problem, Kretser has produced a smartphone app called Wildlife Alert that gives law enforcement officers a mobile decision tree for figuring out whether or not a wildlife product from Afghanistan is legal. Writing in the journal Biological Conservation, Kretser and her WCS coauthors also announced the development of a similar app, called Wildlife Guardian, already being tried out by forest police and customs officers to address rampant illegal wildlife trafficking in China.

Neither app attempts to turn cops into taxonomists. The apps are merely tools, Kretser said, “that help people make a decision in the field, to say, ‘Yeah, I don’t want to let this by without further expert advice.’ ”

In Afghanistan, Kretser said, the merchandise typically involves products rather than whole animals, “so you usually just have the fur, or part of the horn, or some part of the animal not diagnostic to species.” But simply being able to recognize that the fur comes from a cat, without knowing whether it’s from Prionailurus bengalensis (the leopard cat), say, is good enough, because all of the country’s nine cat species are in trouble. “Our app is set up to try to be conservative about what can go through, to avoid false negatives,” she said.

The Chinese app, on the other hand, is geared toward identifying whole animals. The decision tree for birds, for instance, asks the user to narrow down the possibilities by answering simple questions about body size, body shape (is it more like an eagle or a duck?), beak shape, claw shape, and plumage color.

Related This Kenyan Teenager Made a Simple Device to Stop Elephant Poaching

In the demonstration case, police investigating birds being sold at a pet shop in Guangzhou answer those questions and narrow down the possibilities to a single species, Derby’s parakeet, a Himalayan native now protected under the Convention on International Trade in Endangered Species.

The Chinese app covers 457 species (versus just 75 for Afghanistan) and 15 wildlife products, with biweekly updates and backup confirmation by experts within eight hours. In Vietnam, where smartphones are less common, a similar decision-tree program, covering 152 species, is now available as a website.

The U.S. military version of the app is just going into service at bases in Afghanistan. But about 1,000 law enforcement officers have downloaded the Chinese app so far, according to Aili Kang, the director for WCS China, and 100 have logged in by name. Training has so far concentrated on Guangdong and Guangxi provinces, both known for their illegal wildlife trade. Kang said the ambition is to take the app national.

Will it lead to important arrests? Will it slow the trafficking in wildlife? For cops and customs officers trying to make sense of the alarming stampede of wildlife products they now encounter every day, having a sort of smartphone taxonomist in their pocket is at least a start.