Updated code to use front camera for scanning