Yahoo Messenger front camera is working now! :-)

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
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?
 
  • Like
Reactions: NextineX

jose makalolot

Senior Member
Aug 21, 2009
1,997
156
63
Florida
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?

It uses the back camera and has no options on how to flip or use the ffc.



Sent from my Calculator with Android.
 

jose makalolot

Senior Member
Aug 21, 2009
1,997
156
63
Florida
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. :)
It still uses the back camera. I will attach the logcat later.



Sent from my Calculator with Android.
 

nono240

Senior Member
Jul 2, 2011
61
25
0
Just wanted to say "thank you". I'm a developer, and I needed a way to make the front camera works on Froyo - for most devices. You helped me so much. I'll contribute asap.
 

nono240

Senior Member
Jul 2, 2011
61
25
0
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.
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 ?
 

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
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 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.

For the seccamera, the FFCByClass failed :-D. The one that works for samsung is the FFCByParameter as you can see in this post http://forum.xda-developers.com/showthread.php?t=1087769&page=9
 

nono240

Senior Member
Jul 2, 2011
61
25
0
You only need to include com.motorola.hardware.frontcamera.FrontCamera in your manifest.
You mean "com.motorola.hardware.frontcamera" instead ?

Other than seccamera and motorola, all those others are already in the framework so you don't need to include them in your manifest.
I'm not only targeting HTC or Dell, so I think I still need to include those. Am I right ?

Of course, I'm tagging them as "not required".

Is the namings correct ? I'd like to be sure to not include any class name :

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
 

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
Yes, I mean "com.motorola.hardware.frontcamera". I mistakenly copy-pasted the class name :-D

I think those names are OK. There's no harm in adding all in the manifest as long as they are marked "not required".
 
Last edited:

coradux

Senior Member
Mar 24, 2009
240
17
0
I 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.
The ADB method works perfect on Galaxy SII :D.

PS: the only problem is that when you hold the phone in Portrait Mode, the other person sees you upside-down. If you switch to back camera everything is ok. Also if you hold the phone in Landscape Mode the other person sees you right.
 
Last edited:

tudy23

Senior Member
Feb 19, 2011
68
12
0
Turda
has anyone tried this on LG Optimus Black?I tried the ADB method but it didn't work and I don't know how to copy that com.htc... because with ASTRO it didn't work. I have rooted my phone..thanks for help and I would really love to see this beauty 2 mpx front camera working
 

nono240

Senior Member
Jul 2, 2011
61
25
0
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>:

Code:
new FFCByClass("/system/framework/com.htc.hardware.twinCamDevice.jar", "com.htc.hardware.twinCamDevice.FrontFacingCamera", "getFrontFacingCamera", null, null),       // htc
Model : HTC Wildfire (HTC)
Model : PC36100 (HTC)

(not sure about the latest)

:confused:
 

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
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>:

Code:
new FFCByClass("/system/framework/com.htc.hardware.twinCamDevice.jar", "com.htc.hardware.twinCamDevice.FrontFacingCamera", "getFrontFacingCamera", null, null),       // htc
Model : HTC Wildfire (HTC)
Model : PC36100 (HTC)

(not sure about the latest)

:confused:
I googled HTC Wildfire and it doesn't seem to have FFC. Does it reaally have one?