Understanding this circuit for getting sensor data from an arduino to a phone via the headphone jack
R1 is needed for the android device to recognize that there is something connected to the earphone port.
R3 and R2 are a voltage divider to reduce the signal level from the arduino to a level that the android device can accept.  It reduces the level at a ratio of 5 to 1 (5V from the arduino would give 1V in to the android.
C1 is used because the android uses a DC voltage on R1 to detect the external connection.  C1 removes the DC part of the signal from the arduino so as not to interfere with the android accessory detection.