BUFFALO, N.Y. - It's illegal to text and drive in 47 states, including New York.

But people do it anyway -- as you may know from experience -- and it leads to countless deaths and injuries on the roads. According to the Institute for Traffic Safety Management and Research, cellphone-related crashes injured 2,784 people in this state from 2011 to 2015. The consequences of texting-and-driving may be disastrous, but cases can be extraordinarily hard to prove in the court of law.

That's why the so-called "textalyzer" is so intriguing to many stakeholders, including state lawmakers, law enforcement, personal injury attorneys and families who've lost loved ones to texting-and-driving deaths.

The "textalyzer" technology would allow police to detect whether you've sent a text, tweeted or scrolled through Facebook right before an accident. Officers could retrieve the data simply by plugging their textalyzer into your phone.

It's not legal here or anywhere else in the United States, but a bipartisan group of state lawmakers have drafted legislation in the Senate and Assembly the past two years to allow police to use the textalyzer in field tests. In the most recent session in Albany, the legislation never came to the floor for a vote in either chamber, so Gov. Cuomo asked a traffic safety committee to review the technology this summer.

The device's potential could be "revolutionary," according to Chris O'Brien, a Buffalo attorney who specializes in car accident cases.

"It's a rare thing where we actually have someone who admits at a deposition that they were texting at the time," O'Brien said. "What we want, is a situation to hopefully reduce the amount of negligent drivers out there."

The textalyzer is being studied by a state committee. 

But the constitutionality of the textalyzer is under dispute, particularly from the American Civil Liberties Union, which strongly opposes the use of the technology without probable cause or a warrant.

Jay Stanley, a senior policy analyst for the ACLU, published a lengthy article on the organization's website last month, outlining a number of concerns about the textalyzer. Among his main points: The textalyzer could give police easier access to personal data from your text messages or social media feeds.

"The potential invasion of privacy would be enormous," Stanley wrote, "and needs to be subject to the centuries-old warrant framework by which such potential invasions have always been restrained."

The legislation drafted in the New York State Legislature, however, specifically described the technology as "able to immediately determine cell phone usage without any inquiry into the content." Co-sponsors of the bill in the State Senate include Michael Ranzenhofer (R-Amherst), Tim Kennedy (D-Buffalo) and Chris Jacobs (R-Buffalo).

In its justification of the bill's language, legislators cited a Supreme Court opinion by Justice Samuel Alito in Riley v. California, in which he wrote that police would need a warrant to search contents of a phone but encouraged legislation that would draw "reasonable distinctions based on categories of information." In other words, Alito appeared to favor any law that would clearly instruct police not to search contents of a cell phone without obtaining a warrant.

"Quite frankly, the content doesn't matter," O'Brien said. "What matters is if the phone was in use."

However, Buffalo attorney Barry Covert, a 2 On Your Side legal analyst with an expertise in constitutional law, maintained in an interview earlier this year that the textalyzer still would not hold up in higher courts.

"This legislation, as noble a cause as it is, because distracted driving is incredibly dangerous, is too burdensome on individual freedoms and rights," Covert said.

Gov. Cuomo's committee will be studying constitutional issues as a part of its review.

O'Brien said he certainly understands the constitutional concerns, but he believes the textalyzer would be a strong tool for law enforcement if it's regulated properly.

"We all drive on the roads, and we all see people of any age group who are texting," O'Brien said. "We know what's going on, and it's wrong. But it's a situation where we've got to figure out a way to convince people to move away from it."