A communication device comprises an electronic component and a magnesium alloy casing. The composition of magnesium alloy materials used by the magnesium alloy casing is as follows: less than 10% by weight of aluminum; 1-10% by weight of rare earth elements; less than 1% by weight of manganese; less than 1% by weight of zinc; less than 1% by weight of zirconium; and less than 3% by weight of calcium. The rest of the composition is magnesium and unavoidable impurities.