Silver Nitrate Solution is used to test for the presence of halide ions in solution. Dilute nitric acid is first added to get rid of any carbonates which can interfere with the test. Adding aqueous ammonia dilute or concentrated can help identify the halide.
Learn to match the anions with the observations that flashes.
Chloride
White ppt soluble in dilute ammonia
Bromide
Cream ppt slightly soluble and soluble in concentrated ammonia
Iodide
Yellow ppt insoluble in dilute or concentrated ammonia