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 (PubMed:12829714, PubMed:18669915). 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 EA2 as substrate (PubMed:12829714). In the larval midgut, required for O-glycosylation of apical and luminal proteins within copper cells enabling proper gut acidification (PubMed:22157008). 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 during oogenesis, in the somatically derived follicle cells that surround the developing oocyte, which are involved in the maturation of the oocyte and construction of the egg shell, as well as playing a role in subsequent embryonic pattern formation. During embryonic stages 9-11, expressed in the primordium of the foregut, midgut and hindgut. Expressed in salivary glands from embryonic stage 12 onwards. During embryonic stages 12-13, expressed in the posterior midgut and hindgut. During embryonic stages 14-17, expressed in the hindgut and the posterior spiracles. Expression is also detected in the epidermis and antennomaxillary complex at embryonic stages 16-17. In third instar larvae, ubiquitously expressed in wing, eye-antennal, leg and haltere imaginal disks. Expressed throughout embryonic, larval, pupal and adult stages, with increasing levels during larval development. Transcripts are first detected during embryonic stages 9-11. 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. Lethal (PubMed:22157008). RNAi-mediated knockdown in the whole body, embryonic mesoderm, respiratory system or digestive system and reproductive tract is lethal (PubMed:22157008). RNAi-mediated knockdown in the larval digestive system, results in loss of gut acidification and disruption of protein O-glycosylation in copper cells (PubMed:22157008). RNAi-mediated knockdown in hemocytes, amnioserosa, endoderm, mesoderm or nervous system causes no defect (PubMed:22157008). Belongs to the glycosyltransferase 2 family. GalNAc-T subfamily. Truncated C-terminus.