A front-facing camera isn't something that has been around since the beginning of Android. Neither the early Android devices nor the original iPhone for that matter had cameras on the front of the device, only on the rear for more traditional photo taking situations. It wasn't until Gingerbread (Android API level 9) that front-facing cameras were officially supported on Android. This means that Android's default implemenations for cameras on their devices revolved around back-facing cameras. Calling the default Camera.open() method will open a device's default back-facing camera. If a device doesn't have a back-facing camera, this method returns null, even if the device DOES have a front-facing camera. In order to open and use an Android device's front-facing camera (yes, this includes the DX650) you have to call a different version of the Android Camera open() method that takes a parameter referring to the "id" of the camera.
But how do I know this "id", you ask? Well, the camera sample application included with the DX650 Add-on (available on this site) provides an example on how to find and open the DX650's front-facing camera. To sum it up in words, you can iterate through the device's cameras, check to see if they are front or rear facing, and select the first front-facing one you come across (you probably won't come across too many devices with multiple front-facing cameras). To sum it up in code, the following code snippet, which is also present in the sample app, shows how:
1Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
2int cameraCount = Camera.getNumberOfCameras();
3for (int i=0; i<cameraCount; i++) {
4 Camera.getCameraInfo(i, cameraInfo);
5 if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT && camera == null) {
6 try {
7 camera = Camera.open(i);
8 } catch (RuntimeException e) {
9 Log.e(LOG_TAG, "Camera failed to open", e);
10 }
11 }
12}
2int cameraCount = Camera.getNumberOfCameras();
3for (int i=0; i<cameraCount; i++) {
4 Camera.getCameraInfo(i, cameraInfo);
5 if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT && camera == null) {
6 try {
7 camera = Camera.open(i);
8 } catch (RuntimeException e) {
9 Log.e(LOG_TAG, "Camera failed to open", e);
10 }
11 }
12}
So now you know how to open the front camera on the DX650, but where do you put this code in your project? In our sample, we put this code in our sample Activity's onResume() method. While this is fine for basic implementations (like our sample) and facilitates code reuse, Android recommends that you open the camera on a separate thread launched from onCreate(). The Android Developer site's lesson on "Controlling the Camera" talks about this issue as well as others around controlling the camera. Also, the Android Developers' Camera overview gives a step-by-step walkthough of what your code needs to do to take a picture or record a video using the Android Camera APIs. With the information from these links and the sample application included in the DX650 Add-on, you should have no problem enabling the DX650's camera in your enterprise application.
0 Comments
CDN is expanding!
We have created a ‘Consolidated Dashboard’ which allows our Partners to participate in multiple programs within CDN. We have added Tabs in the left Navigation column to better articulate where you are in the Dashboard.

• General Partner Information is where you edit Company and Contacts information. If eligible, you can also join other Supported Programs. This is your new Landing screen.
• Cisco Developer Network Program is the screen which you are familiar with, for Status and Administrative Tasks specific to your product and Cisco relationship: Manage Solutions, Manage Deals, Request IVT, etc. No change in function and features.

Other Minor Changes
• ‘Complex Products’ for presence in the Marketplace Solutions Catalog has been relabeled ‘Solutions’
• In the above example, the Partner has joined a second Program within CDN
Conclusion
We welcome feedback and support is just an email away cisco-developer-network@cisco.com.
Today we announced our latest Video enabled Smart Desk Phone. The Cisco Desktop Collaboration Experience DX650, or simply the DX650. This device represents years of experience, knowledge, and technology delivered in a powerful and stylish desktop platform.
Based on the Android Operating System, the DX650 provides Cisco's high quality Voice and Video technolog plus all the richness of Android.
Our team is here to help you create powerful applications for the DX650.
Let us know what you think, tell us what you want to know. We look forward to serving you!
Sincerely
Larry M and the rest of the Developer Experience team.
@dxdevex
More information regarding ESXI CIM vs SNMP is provided here: http://www.vmware.com/files/pdf/techpaper/hwhm41_technote.pdf .
RSS (Opens New Window)