Try this one. I removed the SecCamera code so it's now using ("camera-id", 2) to open the FFC. Let me know it it works so I can update the first post.
Attachments
-
256.9 KB Views: 93
Isn’t the LG supported in fring? I checked the code and it seems like it supports LG-P990 and LG-P999. They use the function "Camera.Parameters.setCameraSensor" though instead of "camera-sensor". I don't know, maybe they are just the same. What error you get when you use it?Kapatid, do you have a solution for fring also?
Isn’t the LG supported in fring? I checked the code and it seems like it supports LG-P990 and LG-P999. They use the function "Camera.Parameters.setCameraSensor" though instead of "camera-sensor". I don't know, maybe they are just the same. What error you get when you use it?
tol, try this one I modified. I incorporated the jar code for YM and made a minimal change to fring's code. It should support the same hardware list as the YM.Kapatid, do you have a solution for fring also?
Please check your inbox, I PMed you for the fix.It works except for some reason I've been rotated clockwise![]()
It still uses the back camera. I will attach the logcat later.tol, try this one I modified. I incorporated the jar code for YM and made a minimal change to fring's code. It should support the same hardware list as the YM.
Let me know if it works or if not, please send me the logcat again.![]()
Good job. Integrating your code into my manifest, do you know exactly the <uses-library> tags I should put in ? From your code, I spotted the followings :Updated the code to support more devices including Gingerbread devices, Samsung, LG, Dell, Huawei and those HTC devices not supported by YM front camera video call.
You only need to include com.motorola.hardware.frontcamera.FrontCamera in your manifest. Other than seccamera and motorola, all those others are already in the framework so you don't need to include them in your manifest.Good job. Integrating your code into my manifest, do you know exactly the <uses-library> tags I should put in ? From your code, I spotted the followings :
com.sprint.hardware.twinCamDevice
com.htc.hardware.twinCamDevice
com.motorola.hardware.frontcamera
com.dell.android.hardwareCameraExtensions
com.sec.android.seccamera
android.hardware.CameraSlave
android.hardware.HtcFrontFacingCamera
Am I right ? Any missing ? Some advises ?
You mean "com.motorola.hardware.frontcamera" instead ?You only need to include com.motorola.hardware.frontcamera.FrontCamera in your manifest.
I'm not only targeting HTC or Dell, so I think I still need to include those. Am I right ?Other than seccamera and motorola, all those others are already in the framework so you don't need to include them in your manifest.
The ADB method works perfect on Galaxy SIII was looking at how yahoo video plug-in uses the HTC front camera and found out that it calls “com.htc.hardware.twinCamDevice.FrontFacingCamera. getFrontFacingCamera();” to load it. So I baksmali-ed the com.motorola.hardware.frontcamera.jar and changed it to look like the HTC version so YM can use it.
NOTE: YOU MUST BE ROOTED TO APPLY IT.
ADB Method:
1. Extract YMFrontCamADB.zip
2. Connect your device in Debugging mode (Settings -> Applications -> Development -> USB Debugging)
3. Run YMFrontCam.bat and follow the instructions.
4. Close the process for YM plug-in.
5. Make a video call.
YMFrontCamCWM.zip and YMFrontCWMCamRemover.zip can be used for CWM un/installation
NON-ATRIX devices should use the ADB method as the CWM method is specific for Atrix only. If the ADB method doesn't work, download the com.htc.hardware.twinCamDevice.zip, extract com.htc.hardware.twinCamDevice.jar, copy it to your /system/framework and change the permission to 644
2011-05-31 - Updated to support more devices.
Gingerbread devices (using the standard 2.3 front camera API)
Motorola
Samsung (Untested)
Dell Streak and Streak 7 (Untested)
LG (Untested)
Huawei (Untested)
Other htc devices without the com.htc.hardware.twinCamDevice.jar (Untested)
Feel free to edit the source and make it work on your device
2011-05-31 - Updated YMFrontCamADB.zip script to fix mount command on other devices. The new script requires busybox (rooted devices should have it anyway)
2011-06-11 -Updated YMFrontCamADB.zip and com.htc.hardware.twinCamDevice.jar to fix the exception in integer "Parameters" values (samsung, dell, lg). Source code FrontFacingCamera.java.zip is updated as well. CWM method NOT updated.
I need the fix too, for Samsung Galaxy SII (the Back Camera works ok).Please check your inbox, I PMed you for the fix.
new FFCByClass("/system/framework/com.htc.hardware.twinCamDevice.jar", "com.htc.hardware.twinCamDevice.FrontFacingCamera", "getFrontFacingCamera", null, null), // htc
I googled HTC Wildfire and it doesn't seem to have FFC. Does it reaally have one?I'm currently testing your FrontFacingCamera class. I've some HTC users (running Froyo) reporting me that the front camera isn't recognized. How could it be the case since I added the following to the static initializer, along with the according <uses-library>:
Model : HTC Wildfire (HTC)Code:new FFCByClass("/system/framework/com.htc.hardware.twinCamDevice.jar", "com.htc.hardware.twinCamDevice.FrontFacingCamera", "getFrontFacingCamera", null, null), // htc
Model : PC36100 (HTC)
(not sure about the latest)
![]()