Skip to content

Saral App Debugging

Dileep Gadiraju edited this page Nov 8, 2021 · 1 revision

Android logs

Install https://developer.android.com/studio/command-line/adb

use the below log command to get android logs.

adb logcat

Capture scanned images from Android phone

  1. Set debug option to true to store the image in android mobile. Modify below java file under /saralsdk and change below highlighted flags to true.

SaralSDKOpenCVScannerActivity.java

   mTableCornerDetection           = new TableCornerCirclesDetection(true);
   mDetectShaded                   = new DetectShaded(true);
  1. With the above changes, run the scan on the mobile.

  2. Use the below command to grab the android level logs and search for 'SrlSDK::CVOps: Saving file:' and 'SrlSDK::DetectShaded: Saving file:'. This will give you path to where the saved images are stored in your android phone.

adb logcat

  1. Use the below command to pull the images finally. adb pull <image path in android phone found in above logs> example: adb pull /storage/emulated/0/Android/data/com.saralapp/files/Download/table_4Fg.jpg

SaralSdk log tracing from Android studio

In Android studio,open Logcat view at the bottom while running android application. Use "SrlSdk" as a filter in Logcat view to monitoring Saral SDK logs. This is easy way to monitor whats happening with in SaralSDK code.

Navigate to the Android device path to check files stored.

adb shell cd <Path>

Example: storage/emulated/0/Android/data/com.saralapp/files/Download

Debug React Native Layer

  1. Install react-native-cli using below command.

npm install --global react-native-cli

  1. Run the below command from the frontend folder

react-native run-android

  1. Run below command to trace logs.

react-native log-android

App Crash logs from playstore

https://stackoverflow.com/questions/53612283/how-can-i-get-app-crash-log-from-google-play-console

Clone this wiki locally