New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any problem with Camera.turnOnFlash(true)? #45
Comments
Hello @nikunjbhatt Please check the Media -> Camera example. I'm aware that is possible to turn on the flash without the camera, I will add that to the TODO list and include it for the next release. Maybe you can work with the camera example for now :) |
Ok. Got it. Thanks for quick reply. |
I don't have much idea about Android development, but as per you said that old Android implementation needed active camera to work with flash, which means new Android implementation doesn't require active camera then I think the API should be changed to |
That's a good idea! |
@victordiaz I don't think using verb in methods which are doing toggling things is good. Or there should be 2 different methods for 2 different states, for example: |
@nikunjbhatt I agree It's better without the verb. Thanks for the suggestion :) |
You can now turn on/off the flash light using Feel free to check it and close the issue if it's the expected behaviour. Thanks! |
@victordiaz By the way, in the README.me of the PHONK repo, you have told to contact you by email but I can't find your email anywhere, not in the README.md file, not in your GitHub profile, not on your personal website, not on the phonk.app website! May I know how the reference documentation is generated? In the reference documentation, it is showing as |
Hi @nikunjbhatt Feel free to join this discord server so we can chat https://discord.gg/Rt2mkWp Regarding the documentation. Is it generated with and older version of Java and I had a mess in my system since it updated Java and now the generator does not want to run :/ so the docs are generated some time ago and many methods have changed since then. It would be nice to dockerize the generator so I can run it easily before a new release and things can be up-to-date |
I am exploring this awesome PHONK project.
In the main.js file, if I write only one line
Camera.turnOnFlash(true)
and run the PHONK project, then should it turn the flash on? I tried this after looking in the Reference guide, but it is not working. I also tried below lines:camera.turnOnFlash(true)
device.Camera.turnOnFlash(true)
device.camera.turnOnFlash(true)
But none of these are working. This is the error showing in the Console in the PHONK editor in web browser:
ReferenceError: "Camera" is not defined. (test proj#1)
Am I missing anything? Am I doing any mistake? Or is there any bug?
I tried these in my phone Moto X Play (XT1562) with Android 7.1.1 (Nougat).
The text was updated successfully, but these errors were encountered: