There are plenty of them. Mr. Khalid keeps the back dashboard of his yellow cab stocked with a layer of candy thick enough to induce envy in the most successful trick-or-treater.
“Turn around; see what else is back there,” Mr. Khalid recently told Legend Wilson, 7, who was riding in the cab with his mother, May Wilson. “There’s a lot of options.”
Ms. Wilson said that her son had plenty of candy at home. “Come on, he can have some; he’s in the candy cab!” Mr. Khalid insisted. “I’ll call you when he has to go to the dentist,” Ms. Wilson said as her son collected a small pile of treats.
Free candy isn’t the only perk of riding with Mr. Khalid, a 37-year-old electrical engineer from Pakistan who has been driving a yellow cab since 1996. He also recently bought a $400 subwoofer that, in his words, makes “your heart go boom,” and invites customers to plug their devices into the speakers. To complete the nightclub-in-a-cab experience, the car is also outfitted with an advanced lighting system that, when activated, flashes fluorescent reds, blues and purples.
“Everybody is depressed, stressed, New York City is not an easy life, so when New Yorkers see all the candies, chocolates,” they cheer up, Mr. Khalid said. “Some people start screaming, they’re so happy.”
His altruism isn’t bad for business, either. Mr. Khalid’s cab has become an Internet celebrity, earning thousands of followers on Twitter, Instagram and Facebook. That loyal online following supplies a steady stream of customers for Mr. Khalid, who fields frequent requests for pickups from fans who send their locations to him via Twitter or Facebook.
Mr. Khalid also uses Twitter and Instagram to advertise his services, posting pictures of grinning couples with handfuls of candy.
This grassroots outreach is one way that yellow cabs can rise above the fray in an increasingly competitive market. Last month, the Uber app became the first service to allow New Yorkers to hail yellow cabs with their smartphones, though a pilot program for the apps remains mired in court.
With the candy cab, Mr. Khalid has essentially created his own personal Uber, with nothing more than his smartphone and social media savvy.
But don’t expect the 13,000 other yellow taxis to follow suit any time soon. The $300 a month Mr. Khalid spends on candy would probably be a dealbreaker for most cabbies.
“If you think about it, you have to wonder why he does it,” said Juan Miranda, who drives Mr. Khalid’s cab during the day. “The way it is now, every time I brake, it falls forward.”
Mr. Khalid’s customers certainly appreciate the effort. One rider, Casandra Johnson, was quiet during the first few moments of her ride with Mr. Khalid a few weeks ago, but perked up once she saw the stash in the back seat. “I was in a bad mood because I’ve been lugging boxes all day,” she said, “You just totally changed my Monday.”
Another passenger wrote on Twitter, “Sweetest ride in fifteen years. Left my bag of knitting there, but gained so much at heart when I googled you. God bless.”
She was referring to the somber back story of Mr. Khalid’s generosity. His son, Saad, was born in 2010 with a congenital heart defect, and when Mr. Khalid visited him at Montefiore Medical Center in the Bronx after his night shift, he would bring coffee for the doctors and nurses there, who called him “coffee man.”
“My average was 20 bucks every night, for coffee and sweets,” he said.
Saad died last April, only 18 months old. When Mr. Khalid returned to work, he decided to turn his cab into a rolling celebration.
A year later, Mr. Khalid said that he still has not moved on. He still smells his son’s old clothing, and has kept the boy’s room untouched. But he learned from his time in the hospital that giving to others could at least hide, if not heal, his own feelings of loss.
“I like to buy something for people; I feel good,” Mr. Khalid said. “When you give something from your hand, you feel very good when someone gives a smile.”
A version of this article appeared in print on 05/16/2013, on page A21 of the NewYork edition with the headline: Free Sweets In His Cab, To Delight And to Heal.