Catalyzes the initial reaction in O-linked oligosaccharide biosynthesis, the transfer of an N-acetyl-D-galactosamine residue to a serine or threonine residue on the protein receptor. It can both act as a peptide transferase that transfers GalNAc onto unmodified peptide substrates, and as a glycopeptide transferase that requires the prior addition of a GalNAc on a peptide before adding additional GalNAc moieties. Prefers both EA2 and the diglycosylated Muc5AC-3/13 as substrates, albeit at very low levels fro Muc5AC-3/13. L-seryl-[protein] + UDP-N-acetyl-alpha-D-galactosamine = 3-O-[N-acetyl-alpha-D-galactosaminyl]-L-seryl-[protein] + H(+) + UDP L-threonyl-[protein] + UDP-N-acetyl-alpha-D-galactosamine = 3-O-[N-acetyl-alpha-D-galactosaminyl]-L-threonyl-[protein] + H(+) + UDP Protein modification; protein glycosylation. Expressed in developing oocytes and egg chambers. During embryonic stages 9-11, expressed in the primordium of the foregut, midgut and hindgut. During embryonic stages 12-13, expressed in the posterior midgut and hindgut. During embryonic stages 14-15, expression continues in the hindgut. No expression detected during embryonic stages 16-17 or in third instar larvae imaginal disks. Expressed both maternally and zygotically. Weakly expressed during early embryonic stages but increases during 12-24 hours of embryogenesis through larval development and continues to be expressed throughout adulthood, albeit at slightly lower levels in males than females. There are two conserved domains in the glycosyltransferase region: the N-terminal domain (domain A, also called GT1 motif), which is probably involved in manganese coordination and substrate binding and the C-terminal domain (domain B, also called Gal/GalNAc-T motif), which is probably involved in catalytic reaction and UDP-Gal binding. The ricin B-type lectin domain binds to GalNAc and contributes to the glycopeptide specificity. Belongs to the glycosyltransferase 2 family. GalNAc-T subfamily.