How to Save Sensor TYPE_LIGHT to integer

public static final int TYPE_LIGHT was added in API level 3
A constant describing a light sensor type.

1. Set the Minimum and Target SDK version to 3, or greater. 

2. Declare an integer named intMySensor

3. Add the below line to the onCreate method. This will save the light sensor type(TYPE_LIGHT) to an integer named intMySensor.

intMySensor = Sensor.TYPE_LIGHT;