Skip to content

Commit fe7b6cf

Browse files
Update README.md
1 parent 2cc09c7 commit fe7b6cf

1 file changed

Lines changed: 195 additions & 2 deletions

File tree

README.md

Lines changed: 195 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ scanning/capture SDK evolved with **Best Quality**, **Highest Possible Compressi
1414

1515
> Control **DPI**,**Layout** & **Size** of output images and can convert them into **PDF & TIFF**
1616
17+
> Automatically detect and correct the orientation/rotation of captured documents using the KIMORA AI v2 engine.
18+
1719
> **QR code** & **BAR Code** Scanning & Generation
1820
1921
> **Developer-friendly** & **Easy to integrate** SDK.
2022
23+
> **DeviceGuard** for Anti-Spoofing (Root, Emulator, Mock Location detection) and **DeviceInfo** for offline **DigiPin** generation and hardware intelligence.
24+
2125
> **Works entirely offline**, locally on the device, with **no data transferred to any server or third party**.
2226
2327
*For reduced build size if needed, an initial internet connection may optionally be required to fetch ML data or resource files, depending on the specific integration and features used by the consumer application*
@@ -98,7 +102,7 @@ Based on the requirement, any one or all classes can be used.And need to import
98102
import com.extrieve.quickcapture.sdk.ImgException;
99103
```
100104
---
101-
## 1. CameraHelper
105+
## 1. CameraHelper - The document capture class
102106
This core class will be implemented as an activity.This class can be initialized as intent.
103107
```java
104108
//JAVA
@@ -508,7 +512,7 @@ The SDK includes a supporting class called for static configuration. This class
508512

509513

510514

511-
## 3. ImgHelper
515+
## 3. ImgHelper - The imaging class
512516
Following are the options/methods available from class **ImgHelper** :
513517
```java
514518
//JAVA
@@ -651,6 +655,195 @@ var ImageHelper: ImgHelper? = ImgHelper(this)
651655
> - LayoutType: `A4`
652656
> - ResizeMode: `preserveAspectOnly`
653657
658+
659+
660+
## 4. DeviceInfo - The device info class.
661+
662+
The `DeviceInfo` class provides detailed system specifications, real-time battery status, and precise location intelligence. It features a built-in **Offline Engine** for generating **DigiPins** (India Post's digital addressing system) from coordinates, eliminating the need for external APIs.
663+
664+
### Initialization
665+
666+
```java
667+
// JAVA
668+
DeviceInfo deviceInfo = DeviceInfo.getInstance(this);
669+
670+
```
671+
672+
```kotlin
673+
// KOTLIN
674+
val deviceInfo = DeviceInfo.getInstance(this)
675+
676+
```
677+
678+
### A. Hardware & System Specs
679+
680+
Retrieve a comprehensive map of device details (RAM, Battery, CPU, OS). This is a **Synchronous** (instant) call.
681+
682+
```java
683+
Map<String, Object> specs = deviceInfo.getSpecs().getDetails();
684+
685+
```
686+
687+
#### 📋 Response Data (Specs Map)
688+
689+
| Key | Data Type | Description | Example |
690+
| --- | --- | --- | --- |
691+
| **`manufacturer`** | `String` | Device Manufacturer | `"Google"` |
692+
| **`model`** | `String` | Device Model Name | `"Pixel 7"` |
693+
| **`os_release`** | `String` | Android OS Version | `"14"` |
694+
| **`sdk_int`** | `int` | Android API Level | `34` |
695+
| **`cpu_hardware`** | `String` | Processor Chipset Name | `"qcom"` |
696+
| **`ram_total_mb`** | `long` | Total RAM in MB | `7600` |
697+
| **`storage_free_gb`** | `long` | Free Internal Storage in GB | `128` |
698+
| **`battery_pct`** | `int` | Battery Level (0-100) | `85` |
699+
| **`battery_is_charging`** | `boolean` | Charging Status | `true` |
700+
| **`screen_density_dpi`** | `int` | Screen Density (DPI) | `480` |
701+
702+
---
703+
704+
### B. Location & DigiPin (Asynchronous)
705+
706+
Fetches GPS coordinates and automatically generates the **DigiPin** and **Postal Code**.
707+
708+
> **Prerequisite:** Parent app must handle `ACCESS_FINE_LOCATION` & `ACCESS_COARSE_LOCATION` permissions.
709+
710+
```java
711+
// JAVA
712+
if (deviceInfo.hasLocationPermissions()) {
713+
deviceInfo.getCurrentLocation(new DeviceInfo.LocationCallback() {
714+
@Override
715+
public void onSuccess(Map<String, Object> data) {
716+
String digiPin = (String) data.get("digi_pin");
717+
String postalCode = (String) data.get("postal_code");
718+
Log.d("Extrieve", "DigiPin: " + digiPin);
719+
}
720+
721+
@Override
722+
public void onError(String error) {
723+
Log.e("Extrieve", "Location Error: " + error);
724+
}
725+
});
726+
}
727+
728+
```
729+
730+
#### 📋 Response Data (Location Map)
731+
732+
| Key | Data Type | Description | Example |
733+
| --- | --- | --- | --- |
734+
| **`latitude`** | `double` | GPS Latitude | `12.9716` |
735+
| **`longitude`** | `double` | GPS Longitude | `77.5946` |
736+
| **`accuracy`** | `float` | Accuracy radius (meters) | `12.5` |
737+
| **`digi_pin`** | `String` | **India Post Digital Address** | `"85-12-3456"` |
738+
| **`postal_code`** | `String` | Standard PIN Code (Network) | `"560001"` |
739+
| **`time`** | `long` | Timestamp of fix | `1705648293000` |
740+
741+
---
742+
743+
### C. DigiPin Utilities
744+
745+
Helper methods to handle DigiPins without full location requests.
746+
747+
| Method | Type | Description |
748+
| --- | --- | --- |
749+
| `generateDigiPin(lat, lon)` | **Synchronous** | Instantly converts coordinates to a DigiPin string. |
750+
| `getCurrentDigiPin(callback)` | **Asynchronous** | Fetches location internally and returns just the DigiPin string. |
751+
752+
```java
753+
// Example: Convert known coordinates instantly
754+
String myPin = DeviceInfo.generateDigiPin(12.9716, 77.5946);
755+
// Output: "85-12-3456"
756+
757+
```
758+
759+
---
760+
761+
## 7. DeviceGuard - Device seccurity class
762+
763+
**DeviceGuard** is a security engine designed for Banking, Insurance, and Enterprise apps. It prevents fraud by detecting environment tampering (Rooting, Emulators, GPS Spoofing) before a document is captured.
764+
765+
### Initialization
766+
767+
```java
768+
// JAVA
769+
DeviceGuard guard = DeviceGuard.getInstance(this);
770+
771+
```
772+
773+
```kotlin
774+
// KOTLIN
775+
val guard = DeviceGuard.getInstance(this)
776+
777+
```
778+
779+
### A. Security Report (Pre-Check)
780+
781+
Run this check **before** launching the camera to ensure the device is trusted.
782+
783+
```java
784+
Map<String, Object> report = guard.getSecurityReport();
785+
if ((boolean) report.get("isRooted")) {
786+
// Block User
787+
}
788+
789+
```
790+
791+
#### 📋 Response Data (Security Map)
792+
793+
| Key | Data Type | Description | Severity |
794+
| --- | --- | --- | --- |
795+
| **`isRooted`** | `boolean` | `true` if device is Rooted (Su/Magisk). | 🔴 Critical |
796+
| **`isEmulator`** | `boolean` | `true` if running on a Simulator. | 🔴 Critical |
797+
| **`isDevOptionsEnabled`** | `boolean` | `true` if Developer Options are ON. | 🟠 High |
798+
| **`isAdbEnabled`** | `boolean` | `true` if USB Debugging is ON. | 🟠 High |
799+
| **`isVpnActive`** | `boolean` | `true` if VPN is masking the IP. | 🟡 Medium |
800+
801+
### B. Anti-Spoofing (Mock Location)
802+
803+
Detect if the GPS coordinates provided by the device are fake (Mock Location).
804+
805+
```java
806+
// Pass the location object received from DeviceInfo or LocationManager
807+
boolean isFake = guard.isLocationSpoofed(locationObject);
808+
if (isFake) {
809+
// Reject the capture - User is faking location
810+
}
811+
812+
```
813+
814+
### C. Screen Protection (Privacy)
815+
816+
Prevents the QuickCapture screen from being recorded or captured via screenshots. Video recordings will result in a **black screen**.
817+
818+
```java
819+
// Call in onCreate() of your Activity
820+
guard.enableScreenProtection(this);
821+
822+
```
823+
824+
### D. Real-Time Monitoring
825+
826+
Listen for threats while the app is running (e.g., user toggles VPN or Developer settings during a session).
827+
828+
```java
829+
guard.startMonitoring((threatType, message) -> {
830+
Log.w("Security", "Threat: " + threatType);
831+
});
832+
833+
// Stop monitoring when done
834+
guard.stopMonitoring();
835+
836+
```
837+
838+
#### 📋 Threat Events
839+
840+
| Threat Type | Trigger Condition |
841+
| --- | --- |
842+
| **`VPN_ACTIVATED`** | User connected to a VPN. |
843+
| **`DEV_OPTIONS_ENABLED`** | User enabled Developer Options in settings. |
844+
| **`SCREEN_RECORDING`** | (Android 15+) User started recording the screen. |
845+
846+
654847
## 4. HumanFaceHelper
655848

656849
QuickCapture SDK equipped with advanced face identification intelligence can accurately detect human faces within documents and match them precisely.**SDK needs to be activated using a proper license** with Config.License.Acivate(); for the plus features to initialise.

0 commit comments

Comments
 (0)