Android Tutorial Take pictures with the internal camera

Status
Not open for further replies.

rfresh

Well-Known Member
Licensed User
Longtime User
Is there any way to turn off the camera clicking sound when it takes the picture? I'm setting up a spare phone at home to take pictures of a weather screen. I'd like it to just sit there and take pictures quietly.
 

vb1992

Well-Known Member
Licensed User
Longtime User
phone library has volume settings


B4X:
SetVolume (Channel As Int, VolumeIndex As Int, ShowUI As Boolean)

Sets the volume of the specified channel.

Channel - One of the VOLUME constants.

VolumeIndex - The volume index. GetMaxVolume can be used to find the largest possible value.

ShowUI - Whether to show the volume UI windows.


Example:
Dim p As Phone
p.SetVolume(p.VOLUME_MUSIC, 3, True)
  
 VOLUME_ALARM As Int

Alarms channel.
 VOLUME_MUSIC As Int

Music channel.
 VOLUME_NOTIFICATION As Int

Notifications channel.
 VOLUME_RING As Int

Phone ring channel.
 VOLUME_SYSTEM As Int

System sounds channel.
 VOLUME_VOICE_CALL As Int

Voice calls channel.
 

rfresh

Well-Known Member
Licensed User
Longtime User
Thank you. I've implemented phone volume code in my app previously and have tried turning down the volume on all 5 channels but the camera click sound is still there. It's either controlled by another sound channel or we can't control it?
 

askncan

New Member
Hello Erel

Hello Erel, :sign0087:
And i am sorry about this silly questions but the app only can take 1 picture, have i missed something
 

mrjaw

Active Member
Licensed User
Longtime User
Hi!
This is true ? Just take one photo ? I am doing an app that takes a few photos and send to my server by FTP. It can be posible using the camera and fTP lib?
How can I take a few photos ?
 

birnesoft

Active Member
Licensed User
Longtime User
CameraSound still makes me crazy

I want to take photos while audio recording.
Does anybody solved the problem with the cameraSound.
I've also tried what Erel said.

IDim p As Phone
p.SetMute(p.VOLUME_ALARM,True)
p.SetMute(p.VOLUME_MUSIC,True)
p.SetMute(p.VOLUME_NOTIFICATION,True)
p.SetMute(p.VOLUME_RING,True)
p.SetMute(p.VOLUME_SYSTEM,True)
p.SetMute(p.VOLUME_VOICE_CALL,True)

but the SOUND of the camera is still here. Maybe it's on an other channel.

any ideas?

Gruss Björn
 

birnesoft

Active Member
Licensed User
Longtime User
Seems like it is not possible to do it with Android??

Some Apps do it. Camera without Click Sound.

or you mean:
Seems like it is not possible to do it with B4A

If there is a way in Java, it's possiple to implement this by writing a lib?
or we have to wait for next Version of ACL

thanks Björn
 
Last edited:

birnesoft

Active Member
Licensed User
Longtime User
Turn off camera shutter sound

I didn't find a way to implement it with Java. If you find then it will be possible to port it to Basic4android.

here I've found an example. How I can implement this in B4A?

turn-off-camera-shutter-sound

 
Last edited:

birnesoft

Active Member
Licensed User
Longtime User
Yes it looks like.
Thanks for your fast answers.
You give the best support I know.

Congratulations and thanks for your

20000 Posts.:wav:
 

bjf

Member
Licensed User
Longtime User
Yes.
B4X:
Dim in As InputStream
in.InitializeFromBytesArray(data, 0, data.Length)
Dim bmp As Bitmap
bmp.Initialize2(in)

I'm sorry for bring in up this old thread but this is exactly what i need to do as well.
Can however not get the picture to display using this, is there something else that needs to be done?
I have put the above code right after the photo is taken.
 

birnesoft

Active Member
Licensed User
Longtime User
I'm sorry for bring in up this old thread but this is exactly what i need to do as well.
Can however not get the picture to display using this, is there something else that needs to be done?
I have put the above code right after the photo is taken.

to Display the picture you need an imageView or a Panel

dim p as Panel
p.initialize("")
p.setbackgroundimage(in)
 

Beja

Expert
Licensed User
Longtime User
Hi Erel,

The picture data is stored in bytes. What does 1 byte represent?
my guess is it represents attributes of 1 pixel (color, intensity...etc).
another question: how the picture is sampled? (left-to-right and then down)?

Asking these questions to see if I can try to process the picture digitally.

Thanks in advance.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…