Android Tutorial Take pictures with the internal camera

Status
Not open for further replies.

Swissmade

Well-Known Member
Licensed User
Longtime User
The native Camera object is supposed to return a byte array with the complete data. It seems like a bug in your device. Try to restart your device and see if it helps.

This I have done Erel,

Strange thinks happend.
I have the compleet stream in the Array. See my other thread Sending files with TCP/IP. Sending then image to the server the I get the hole Image.
If Save it I dont get it compleet.

I try to put some DoEvents:BangHead: see whats happend.
 

Swissmade

Well-Known Member
Licensed User
Longtime User
DoEvents will not help here.
You should send the file length before sending the file itself. Then in your server you should read until you read the exact length.

I mean when i Save it to a file on the device I dont get the hole File.
No Problem I try something else.
Whats important that I get it write on the server.

Thanks for Help Erel
:icon_clap:
 
Last edited:

basvanbreg

New Member
Just what i need.

I want to see the sample but i. can't download the attachment. i don't have permission or so... help me out please:sign0085:
 

giangvi

New Member
Hello Erel,
every time I download the example, I always get this message:

"giangvi, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
3. Please read our forum permissions policy.
"

Can you show me how to solve this?
 

koezuma

Member
Licensed User
Longtime User
camera with black screean

dear erel,

i try your camera program without modification, but only black screen and take camera button appear on the device. no activity if i click take camera button. why?
i use android 1.6.

best regards
koezuma

:sign0085:
 

Swissmade

Well-Known Member
Licensed User
Longtime User
Take image from Camera

dear erel,

i try your camera program without modification, but only black screen and take camera button appear on the device. no activity if i click take camera button. why?
i use android 1.6.

best regards
koezuma

:sign0085:

hi koezuma,
If you dont know use this

Dim camera1 As Advancedcamera 'Camera
function Camera1.StartPreview

If this is not working then you have a android version problem.
I hope it helps.
 

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Video

Erel
I am wondering myself to be forced to use Java for grabbing videos. Do you expect to activate this facility in B4Android in some time, or it is far from your expectations?
Thanks
 

chfajardo

Member
Licensed User
Longtime User
Camera - NullPointerException on reading Data()

Hi, Erel!

I have tried your code, and it works fine on my cellphone, but in my tablet it gives me nullPointerException every time a try to take a picture.
The model of my tablet is Coby Kyros MID7024.
Do you have some advice to fix this issue?
On my cellphone, the LoadBitmap() function works sometimes, and sometimes not. What can it be?

Thanks in advance.

Carlos H. Fajardo.
 

chfajardo

Member
Licensed User
Longtime User
Camera - NullPointerException on reading Data()

Erel,

Thanks for the reply, but this happens when i am saving data() matrix.
Anyway, i found out that using AdvancedCamera instead of Camera and setting, for instance, camera1.Picturesize(600,800) works fine now.
 

andrewtheart

Member
Licensed User
Longtime User
DoEvents will not help here.
You should send the file length before sending the file itself. Then in your server you should read until you read the exact length.

Can you elaborate?

Using HttpUtils and the AdvancedCamera library I can POST images to a server as a byte array (specifically, using InitializePost2)

But in PHP I have absolutely no idea how I'd create a "listener" to read in the byte array until every element has been read in.
 

mcmanu

Active Member
Licensed User
Longtime User
Rotate the Panel

Hi,
I have to rotate the panel that i can use the camera in the Horizontal and not in the vertikal format. How can i do this?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…