Green synthesis of biopolymer-silver nanoparticle nanocomposite: an optical sensor for ammonia detection.