A flexible framework for mobile based haptic rendering