  We extend a theorem, originally formulated by Blattner-Cohen-Montgomery for
crossed products arising from Hopf algebras weakly acting on noncommutative
algebras, to the realm of left Hopf algebroids. Our main motivation is an
application to universal enveloping algebras of projective Lie-Rinehart
algebras: for any given curved (resp. flat) connection, that is, a linear
(resp. Lie-Rinehart) splitting of a Lie-Rinehart algebra extension, we provide
a crossed (resp. smash) product decomposition of the associated universal
enveloping algebra, and vice versa. As a geometric example, we describe the
associative algebra generated by the invariant vector fields on the total space
of a principal bundle as a crossed product of the algebra generated by the
vertical ones and the algebra of differential operators on the base.
