Android Question CameraEX 2.20 lib

Harris

Expert
Licensed User
Longtime User
In the lib example, looks like Panel1 needs to be visible in order to take a picture. Fine...
I set it's size to 1 x 1 px so it isn't plainly visible to the users (drivers) that the device is taking a photo of them. (no privacy issue - part of their job requirement).

Should I init this object - take a picture then release it - then init it again (1 hour later) to take another photo? Or, is it light enough to init once and release upon closing the activity where it shall be used?
Lot's of other stuff is also going on in this activity form (GPS, BT connection, geo-zone determination, etc)...

Also, if the screen is Turned OFF, will the camera work? Client needs to record a pic of driver every "x" minutes to ensure mandatory seat-belt use, not smoking (whatever), not asleep at the wheel, not sipping from flask, etc.).

Thanks
 

Harris

Expert
Licensed User
Longtime User
That's what I thought and assumed... paused is PAUSED - don't expect anything... You don't exist.

Shall have to test and see what I can do.
Don't know (or think) that cam can work as a service since it (apparently) needs a preview panel (activity object).

However, I might detect that screen is OFF (which I can - phone lib) and turn it back ON (don't know yet) to take pic...

so many options, so little time...

Hey, with enough time and effort - we may be able to whip Android into behaving like a custom built computer and OS... (yet I am not holding my breath).

There needs to be two OS versions variants... Public (as it is now) and Commercial (where the dev can control things for the commercial environment).
Freak... it is almost there yet...

Wishful thinking...

"edit": and ROOT the device is NOT an option...

Thanks
 
Last edited:
Upvote 0

mangojack

Expert
Licensed User
Longtime User

At least can you not have a service starting every x secs / mins checking the activity is not paused .. if so restart the app.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
At least can you not have a service starting every x secs / mins checking the activity is not paused .. if so restart the app.
Thanks, but we are way beyond that... restarting app is not an option. Way too much real time data being collected for this to happen.
Getting the pic is least important of all else that is going on... and currently working fine.

Thanks
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
B4X:
Sub pe_ScreenOff (Intent As Intent)
    Main.Awake.ReleaseKeepAlive
    Main.Awake.KeepAlive(False)
    Log(" screen was turned OFF - But it's back on again...")
  
End Sub

Now touching the power button has won't shut the screen off...
This code runs in a service module.

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…