Advanced Camera Library

XverhelstX

Well-Known Member
Licensed User
Longtime User
Heey,

I'm editing the camera library a bit and added some functions already like enabling the flash light and more.

but i'm stuck with the focus modes:

B4X:
    /**
     *Sets the focus mode to: Infinity.
     */
    public void FocusModeInfinity() {
       Parameters params = c.getParameters();
        params.setFocusMode( Parameters.FOCUS_MODE_INFINITY );
        c.setParameters(params);  
        
    }
    
    /**
     *Sets the focus mode to: Macro. 
     *Close-up
     */
    public void FocusModeMacro() {
       Parameters params = c.getParameters();
        params.setFocusMode( Parameters.FOCUS_MODE_MACRO );
        c.setParameters(params);  
     
    }

When I change this to FocusModeMacro or FocusModeInfinity, It just won't change and the pictures taken are still the same quality. (like no macro shot of text)

Any help?

XverhelstX
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
Problem, it wont reinitialize after you quit the app and go back in.
Cannot open camera.

Solution:
Add a StopPreview before Releasing the camera

Done just in time. I'm off on my vacation, thank you for fixing the camera app so it's actually useful. I'll add more options when I get home
 
Last edited:
Upvote 0

Merlot2309

Active Member
Licensed User
Longtime User
Hi,

Good job!
Looking forward to see (read: get) the complete version.
Sound good to include amap.

Greets,
Helen
 
Upvote 0

Merlot2309

Active Member
Licensed User
Longtime User
Hi,

Asap: you know
Amap: as much as possible, ha, ha.

Great and I wonder if you finished school for now.
Passed your exams?

Helen.
 
Upvote 0

mkvidyashankar

Active Member
Licensed User
Longtime User
supported focus mode of camera

i am trying to get supported focus mode of camera using

camera1.SupportedFocusMode

but i m getting nullpoint ecxeption error

how to get this
 
Upvote 0

SlavaVB

Member
Licensed User
Longtime User
do you know which lib AdvancedCamera is inside of? Also do you know how to turn on and off the LED? Also, does anyone know how to pause the program for a certain amount of miliseconds?
 
Upvote 0

SlavaVB

Member
Licensed User
Longtime User
The library is available in the first post.

Please start a new thread for this question as it is not relevant to this thread.

thanks, you can delete that post, i found my answer in another post on the forum, thanks
 
Upvote 0
Top