📸 A library that allows you to capture images secretly, in background without alerting users.

Overview

HiddenCamera

A library that allows you to capture images secretly, in background without alerting users.

Build Status Download

Gradle Dependency

Add the dependency to your app's build.gradle:

implementation 'com.cottacush:HiddenCamera:0.0.2'

Usage

HiddenCam uses CameraX under the hood. It is very easy to get started with Hidden cam. First, initialize the camera engine with a Context, A File that represents the base storage folder where the captured images will be saved to, and an OnImageCapturedListener to get capture results:

val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener)

Then prepare the camera for capturing by calling the start() method:

hiddenCam.start()

You can now start capturing images with:

hiddenCam.captureImage()

When you are no longer actively capturing images, stop the camera engine to free the camera hardware by calling:

hiddenCam.stop()

Finally, to clean up call

hiddenCam.destroy()

That's all for basic setup. The captured images should be save at the storage folder provided.

Customisation

HiddenCam attempts to use some default values to improve ease of use. Customization can be done by supplying additional arguments to the HiddenCam() constructor.

Capture Mode (Reccuring or one shot)

The capture mode is specified by the CaptureTimeFrequency class.

OneShot

This capture mode should be used when you want to capture images manually with the capture() function. It is the default setting for the CaptureTimeFrequency parameter

val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener, captureFrequency = OneShot)

Recurring

This capture mode should be used when you want to activate continuous captures at a specified interval. The captures will start as soon as you call the the start() function on your HiddenCam instance. Manual calls to the capture() function will be ignored.

val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener, captureFrequency = Recurring(captureIntervalMillis))

where captureIntervalMillis is the interval.

Resolution and Aspect Ratio

You can either set Resolution or AspectRatio, not both. If Resolution is not set, HiddenCam will try to use the best resolution based on the selected (or default) AspectRatio and phone's camera hardware capability. Resolution can manually be specified by passing a Size object to HiddenCam constructor. For example, a resolution of 1080 X 1920 can be applied as follows:

val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener, targetResolution = Size(1080, 1920))

To override the phone's default Aspect ratio, you can pass a TargetAspectRatio enum to the camera instance. For example, an aspect ratio 16:9 can be applied as follows:

val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener, targetAspectRatio = TargetAspectRatio.RATIO_16_9)

Rotation

By default, the camera rotation is set to match the default display's rotation during the creation of the HiddenCam object. This should work for most cases. If you need something more specific, you can set the rotation:

val rotation: Int = {...}
val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener, targetRotation = rotation)

Camera Type

You can use use the CameraType enum to specify weather you want to use a front camera, or a back camera. The default settings is FRONT_CAMERA. For example, to use a back camera, you can do:

val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener, cameraType = CameraType.BACK_CAMERA)

Full Configuration

Eventually, a fully customised HiddenCam instance would look like this:

hiddenCam = HiddenCam(
            context = context,
            baseFileDirectory = baseStorageFolder,
            imageCapturedListener = captureListener,
            targetAspectRatio = TargetAspectRatio.RATIO_16_9,
            targetResolution = Size(1920, 1080),
            targetRotation = windowManager.defaultDisplay.rotation,
            cameraType = CameraType.FRONT_CAMERA,
            captureFrequency = Recurring(captureIntervalMillis = 15 * 1000)
        )

License

Copyright (c) 2019 Cotta & Cush Limited.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Library not working in upgrade version

    Library not working in upgrade version

    my Gradle version : 4.1.0 jetbrains.kotlin:kotlin-gradle-plugin : 1.4.30

    it's not working in the latest version , it gives error like this :

    Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.

    Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.pom - https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.pom - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.pom Required by: project :app > com.cottacush:HiddenCamera:0.0.2

    opened by PiyushMangukiya03 2
  • I am less than a NOOB.Will you help me?

    I am less than a NOOB.Will you help me?

    I want to create a simple that runs in the backround and captures photo stealthily when remotely activated via email service and sends captured photo to e-mail using this library.PLEASE I want to use this app as a sub process of myOfficeManagement suite program.

    wontfix 
    opened by minhazsites 0
  • Java interop: make the library usable by Java clients.

    Java interop: make the library usable by Java clients.

    This PR adds @JvmOverloads annotation to HiddenCam to provide overloaded constructors for Java clients. It also provides proper up navigation with arrow back button in the sample project.

    opened by rasheedsulayman 0
  • Minor modification to the kDocs.

    Minor modification to the kDocs.

    Minor modification to the kDocs, Also, change instances of "photo(s)" to "image(s)" to be consistent with the APIs (e.g OnImageCapturedListener)

    opened by rasheedsulayman 0
  • Sample usage setup, support for capture modes (OneShot and Recurring), code cleanup

    Sample usage setup, support for capture modes (OneShot and Recurring), code cleanup

    This PR adds sample usage in form of a runnable App. It also adds support for capture modes (One shot and Recurring). Finally, general code cleanup and little refactor was done.

    opened by rasheedsulayman 0
  • Is HiddenCam run on Android 11 ?

    Is HiddenCam run on Android 11 ?

    This project works perfect on Android 10 and below but creating some issue on Android 11. I actually wanted to know is this project support Android version 11.

    Looking forward to hear from you soon. Thanks!

    opened by arbaz07 0
  • I cannot run hidden cam in a service.

    I cannot run hidden cam in a service.

    I am getting image path using interface and here is the code.

        hiddenCam = HiddenCam(
            context = this,
            baseFileDirectory = baseStorageFolder,
            imageCapturedListener = this
        )
    

    but the interface is not returning the image path or capturing the image.

    opened by sayyedrizwan 0
  • Sorry, but this lib won't work as intended in pop-up camera phones

    Sorry, but this lib won't work as intended in pop-up camera phones

    I'm happy you are working for this lib, congratulations! This is something that I realized, and I feel you should add it in the description of the lib. Because someone could include your lib, and when the time comes, that app will suffer for opening the camera and capturing with no intimation to the user about it.

    discussion 
    opened by mumayank 2
Releases(v0.0.3)
Owner
Cotta & Cush Limited
We are web, mobile and data engineering experts.
Cotta & Cush Limited
Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.

Pix (WhatsApp Style Image and Video Picker) Pix is a WhatsApp image picker replica. with this you can integrate a image picker just like WhatsApp. Upc

Akshay sharma 742 Jan 4, 2023
Camera Folder: "Take a Photo from Camera" everywhere where you can open a photo file

When "Camera Folder" is installed many Android-Apps that can open jpg files can also take a photo from camera.

k3b 18 Dec 20, 2022
A library to take picture easy, transform your data in different format and save photos in your device

A Magic library to take photos and select pictures in Android. In a simple way and if you need it also save the pictures in device, and facial recogni

Fabian Rosales (Frosquivel Developer) 331 Nov 20, 2022
Android library to choose image from gallery or camera with option to compress result image

ImagePicker Android library to choose image from gallery or camera with option to compress result image. Download Add this to your project's build.gra

Mayank Nagwanshi 73 May 20, 2022
Image Picker library for Android

Ronnie-Image-Picker Asks for Camera and storage permission and return uri of the images taken or picked from the gallery. Min Api Level: 16 Build Syst

Ronnie Otieno 33 Nov 19, 2022
A new camera app for GrapheneOS based on the modern CameraX library.

This is the new GrapheneOS Camera app based on Android's modern CameraX library. It's currently in the alpha phase and isn't yet included in GrapheneO

GrapheneOS 513 Jan 1, 2023
Snappy - an android camerax library for taking snapshot fast & simple

Snappy is an android camerax library for taking snapshot fast & simple. Easy to integrate, 100% Kotlin & jetpack compose driven.

Nils Druyen 16 Dec 15, 2022
Screen Capture Utils - A plugin to handle screen capture events on android and ios

Screen Capture Utils A plugin to handle screen capture events on android and ios ?? Initialize SDK late ScreenCaptureUtils screenCaptureUtils;

Chiziaruhoma Ogbonda 41 Apr 12, 2022
⚡️A highly customizable, powerful and easy-to-use alerting library for Android.

Flashbar A highly customizable, powerful and easy-to-use alerting library for Android. Specs This library allows you to show messages or alerts in you

Aritra Roy 1.7k Dec 7, 2022
Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.

# Media Recorder Dialog ![](https://img.shields.io/badge/Platform-Android-brightgreen.svg) ![](https://img.shields.io/badge/Android-CustomView-blue.sv

Abdullah Alhazmy 73 Nov 29, 2022
Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.

# Media Recorder Dialog ![](https://img.shields.io/badge/Platform-Android-brightgreen.svg) ![](https://img.shields.io/badge/Android-CustomView-blue.sv

Abdullah Alhazmy 73 Nov 29, 2022
An android application that allows its users to download and set different images as their wallpapers either on the home screen, lock screen or both.

UHD Wallpapers This an android application show cases different sets of images from unsplash and allows its users to download and set them as wallpape

null 2 Oct 31, 2022
Realtime SOS Android Application. Location (GPS + Cellular Network) tracing application by alerting guardians of the User.

WomenSaftey Women Safety Android Application: Realtime SOS Android Application. Designed a Location (GPS + Cellular Network) tracing application by al

jatin kasera 6 Nov 19, 2022
Android app simulates an emergency alerting mechanism, for falls, earthquakes and fires.

smart_alert This Android application simulates an emergency alerting mechanism, for falls, earthquakes and fires. Users can abort an emergency alert c

null 0 Nov 5, 2022
An IoT based automatic alerting device that consists of laser and a precise Light Dependent Resistor to detect the laser which is employed to constantly monitor the fluid level

An IoT based automatic alerting device that consists of laser and a precise Light Dependent Resistor to detect the laser which is employed to constantly monitor the fluid level. When the fluid level is below the critical level which will be defined by laser, it will alert the patient through buzzer, nurses and doctors through mobile app and the …

null 0 Feb 12, 2022
Realtime, Accurate Background Changer, Portrait Segmentation, Portrait Matting, Background Removal for Android

Realtime Background Changer on Camera Stream Realtime, Accurate Background Changer, Portrait Segmentation, Portrait Matting, Background Removal SDK fo

FaceOnLive 87 Dec 30, 2022
Noice is an android app that allows you to create your own set of background sounds by mixing clips from environmental sources.

A native Android app to relax, improve focus and boost productivity with minimal background noise.

Ashutosh Gangwar 666 Jan 3, 2023
A media player, currently only for Android, that allows you to play songs in background for free

Just Listen A music player currently only for android. It is using Audius public APIs to display and get the playlists/songs. Available on google play

null 68 Dec 27, 2022
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

Rasheed Sulayman 26 Jul 17, 2022