Object handling process of the sensitive or fragile object is critical to preserve its quality. In this domain, soft robotics has gained a lot of attention. However, limitations of detecting contact and grasping behavior is still a challenging task due to the non-linear behavior of soft gripper. Moreover, to regulate grasping behavior, exact real-time contact feedback is a crucial task. To improve the contact detection accuracy a gradient-based algorithm is proposed with the feedback from a simple resistive flex sensor and a pressure sensor. For that purpose firstly, the resistive flex sensor is embedded into the gripper to get the real-time gripper's finger position. Secondly, solenoid valves and pressure sensors are used to control the pneumatic pressure from the pump, and finally, a closed-loop control system is developed for controlling the grasping process. The proposed contact detection algorithm can provide contact feedback with an accuracy of ±3mm, which is implemented to perform the size recognization of the sphere-shaped objects. A real-time experimental setup has been developed which can successfully perform a pick and place of fruits and vegetables.The key benefits of the proposed algorithm are less complexity and better accuracy.