The app was disguised as a game.
Police released a mugshot Wednesday of 18-year-old suspect Colin Howard.
RELATED: UC Santa Cruz student faces federal drug charges for app
"We would've rather seen him doing research on cancer, or something else that would've been positive in the world," said UC Santa Cruz Police Chief Nader. "He (Howard) is no longer a student on our campus."
The app is called "Banana Plug," a play on UC Santa Cruz's mascot, the Banana Slug.
It was being advertised on flyers all over campus.
Howard is from Sunnyvale. A Homeland Security agent alleges Howard developed the app, which offered contraband for sale - including cocaine, "molly," and "shrooms."
18 year old UC Santa Cruz student Collin Howard arrested for allegedly selling drugs off an app he created called “Banana Plug.”— Matt Keller (@MattKellerABC7) February 20, 2019
He’s facing federal drug charges. https://t.co/DLT61MMmRx pic.twitter.com/L7F9dFw9uL
It was available on the Apple App Store.
"Once it's in the app store, a lot of things can go wrong," said Ahmed Banafa, SJSU cybersecurity expert and engineering expert. "That's why this monitoring, the community monitoring and the reporting was very important in taking it down."
An affidavit also says customers were invited to make special requests.
An undercover sting with multiple drug buys ended with Howard being arrested last Friday.
He's charged with four counts of distribution and possession with intent to distribute cocaine and methamphetamine.
He was released from custody after his court appearance Tuesday. If convicted, Howard could face decades in prison and millions in fines.
See the full release with more information from the Department of Justice here.