Android Question Take camera pictures in service background

prokli

Active Member
Licensed User
Longtime User
How can I make pictures with my camera without loading a activity (layout!) with a predefined panel? I would like to create some photos via a service running in background without any visible GUI.

Thanks, Harald
 

hears

Active Member
Licensed User
Longtime User
how you do it ? now i need take picture in service .
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

hears

Active Member
Licensed User
Longtime User
i have looked ,and this post about Transparent activity: https://www.b4x.com/android/forum/threads/transparent-activity.16814/#content

i do not know how to use this “Transparent activity“ in service model... can you help me change my code ?

this is my code ,i use PANEL1 Initialize in service,so have erro now.

B4X:
Private Sub InitializeCamera
    camEx.Initialize(PANEL1, frontCamera, Me, "Camera1")
    frontCamera = camEx.Front
    
End Sub
 
Upvote 0

hears

Active Member
Licensed User
Longtime User
Works great!
Thanks a lot
how you finish your project ? about backgroud take picture ? can you help me some code?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You should ALWAYS create a NEW THREAD for your question(s)!
Posting to an existing thread is the wrong way to ask for help.

You can not use an activity from a service. Though you can call a sub in the activity.
You must use an activity to capture a picture from the camera.
 
Upvote 0
Top