Android Safety system. Advanced FTP WebCam Rescue Photo - Android Phone Web Cam with FTP support

Rescue Photo Software

Android Camera2 API CallBack


      Android Source Code
      
      Java program for surveillance using an Android smartphone. Webcam with FTP access to the photo storage.
      
      
  Android Safety SYSTEM >>  
      
      When working with a camera, different callbacks are triggered. Let's see how each callback interacts with the Camera2 API when we grab an image from a device.
      Five callbacks are the minimum that you need to understand to work with the camera.
      
      API Camera2
      
      Let's consider callbacks
      
      API Camera2
      
      private CameraDevice.StateCallback mCameraCallback = new CameraDevice.StateCallback() { //As soon as the camera is ready, that callback is triggered
      We initialize the CameraDevice.StateCallback object in our application, one of the methods of which will be called after the camera is opened on the device.
      
      @Override
      public void onOpened(@NonNull CameraDevice cameraDevice){...}
      
      We do this
      
      public void onOpened(CameraDevice camera) { // When the camera is OPEN and can do something there: display the image from the camera on a preview, forward it further for saving, and so on.
        mCameraDevice = camera;
        Log.i(LOG_TAG, "== Open camera with id:"+mCameraDevice.getId()); //Which camera will be used
        createCameraPreviewSession();
      }
      
      We need to keep track of the moment when the picture taken by the camera becomes available to us. Organizing the transfer of the image from the camera to other objects is a rather resource-intensive process, so it will also be performed in the background. For this there is a CameraCaptureSession.CaptureCallback object, its onCaptureCompleted method will be called after the camera captures an image.
      
      mCameraDevice.createCaptureSession(Arrays.asList(surface,mImageReader.getSurface()) - In order to be able to view or take pictures, you need to create a session to work with the camera. Call the createCaptureSession () method for the selected camera.
      
      new CameraCaptureSession.StateCallback() {
      
      @Override
      public void onConfigured(CameraCaptureSession session) { // Take a picture here
      ...}
      
      A situation when the camera has already turned on and can send data:
      
      @Override
      onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {
        mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER,
          CameraMetadata.CONTROL_AF_TRIGGER_START);
        mCaptureSession.capture(mPreviewRequestBuilder.build(),
          mCaptureCallback, mBackgroundHandler)
        ...
      };
      
      Example
      
      CameraCaptureSession.CaptureCallback CaptureCallback = new CameraCaptureSession.CaptureCallback() {
      
      @Override
      public void onCaptureCompleted(@NonNull CameraCaptureSession session,
            @NonNull CaptureRequest request,
            @NonNull TotalCaptureResult result) {
        }
      };
      
      CameraCaptureSession.CaptureCallback (class) - A callback object for tracking the progress of a CaptureRequest submitted to the camera device.
      CameraCaptureSession.StateCallback (class) - A callback object for receiving updates about the state of a camera capture session
      
      Determining when the image of the photo is ready
      
      private final ImageReader.OnImageAvailableListener mOnImageAvailableListener // Listen when the image is ready
      = new ImageReader.OnImageAvailableListener() {
        @Override
        public void onImageAvailable(ImageReader reader) {
          mBackgroundHandler.post(new ImageSaver(reader.acquireNextImage(), mFile));
          //============ Write to telemetry ===============
          PrintTelemetry npt = new PrintTelemetry();
          printTxtView = "Image Ready - OK";
          npt.printTV(printTxtView);
          //==================================================
          Log.i(LOG_TAG, "==| onImageAvailable |== - Image Ready - OK ");
        }
      };
      
      

Android Camera2 API CallBack

      Application Rescue PHOTO has significant commercial potential. A huge number of old and damaged smartphones are sent to a distant box, landfill or recycling, without creating any cashback for you. Having zero cost, such smartphones can be used for photographic observation of objects via the Internet. Those. can be used to create low-cost commercial products. A company that creates such software can have positive dynamics in the market. Using the basic software product Rescue PHOTO in Java, you can create software for any needs of your customers.
      Many useful functions can be added to the basic Java code based on additional agreements with clients. This allows you to monetize the free
Rescue PHOTO remote surveillance app.


      
      
index.htm - MAIN web page
      
dnl0009.htm - source code Write Resource
      
dnl00010.htm - source code TimerTask class
      
dnl00012.htm - source code use Timer
      
dnl00014.htm - source code Make DARK / LIGHT screen
      
dnl00015.htm - source code Android TimerTask
      
dnl00016.htm - source code Write Image
      
      
  Android Safety SYSTEM >>  
      
      You can use the web page with HTML and Java Script code. Such a web page can be hosted on any hosting. Or use the PHP web page and get more information. But then your free or paid hosting must support PHP.
      
      
Android Source Code >>  Sitemap >>
      
      The application has complex Java code. The source code spans several pages. Source codes of application modules are available on GitHub.
      
      Web Archive
      The Wayback Machine is an initiative of the Internet Archive, a 501(c)(3) non-profit, building a digital library of Internet sites and other cultural artifacts in digital form.

Android Write Resource


      
OFLAMERON.COM >>
      
      Android 10 Supported
Объясним всё
      

Android Write Resource

Android phones safety system - Rescue PHOTO version 0.00 (technical release). (c) by Valery V Shmeleff
Android Safety System