When robot hands work in a com plex environment, it not only needs to sense the objects in contact, but also needs to respond to remote events before physical contact. In this way, robot hands can make prediction, so as to better adapt to the complex environment. In this paper, we have designed a flexible sensor array, which integrates piezoresistive sensor and capacitive sensor for detecting pressure and proximity signals simultaneously. Piezoresistive sensors can detect pressure signals, and capacitive sensors detect pressure and proximity signals. The sensors are arranged in a patterned array and installed on the robot hand to help the robot hand detect the distance and direction of approaching objects, as well as the shape and size of the grasped objects. To avoid mechanical mismatch, piezoresistive sensors and capacitive sensors are fabricated by the same flexible materials. In addition, after extreme pressure tests, the sensors can still work normally, so as to ensure that the robot hands can work normally in complex environments. We also combined the detected signal with machine learning, so that the robot can accurately identify objects of different shapes. In the fruit recognition test, the recognition accuracy reached 90%.