Category: FAQ-Replay

Screen capture permission is frequently requested.

FRep2 captures screen only when necessary for recording / replaying of Image, OCR or Screenshot control.

Android 14’s behaviour

However, on Android 14, starting foreground Services with screen capture function requires the permission for it. So, FRep2 service releases the permission a few minutes (adjustable) after using it, or when screen is OFF. When the permission is released, the capturing icon at notification bar will disappear.

The request dialog open after the permission is released.

If you want to keep the permission for a longer time, change the Release Capture Permission in System Settings.


Skip request by grant permission to FRep2 app (Workaround)

If you have PC or Mac and USB cable for communication, you can grant screen capture permission to FRep2 to skip future requests / confirmations. The ‘frep2_grantcapture‘ script included with Precision Mode Setup tool will grant it to FRep2 app by USB debugging. After that, the screen capture permission will not be requested, even after rebooting Android.

*The request will not appear when starting FRep2 service on Android 14.

Please refer to the steps for each tool for instructions.

Image control fails.

The main cause of image recognition timeout (failure) is either “the designated image does not appear on the actual screen” or “failed to take a screenshot”. Please try the following to identify the cause and solve the issue.


Check the screenshot when the recognition failed

  1. In setting screen of the Image control, Advanced Settings (Adv. Settings) – On timeout, save screenshot: ON.
    *Requires storage (media) access permission for FRep2.
  2. Replay the record and confirm that image control actually fails.
  3. Open the setting screen of the Image control again, then tap Advanced Settings (Adv. Settings) – On timeout, save screenshot: ON to show the screenshot on failure.

Case A. “Cannot open Image.” message shown: Refer next section ‘In case screenshot capture fails’.

Case B. A black image instead of a screenshot: Refer next section ‘In case screenshot capture fails’.

Case C. A screenshot is displayed, but it is different from expected: If the timing of the taking screenshot is different, please adjust by increasing the Timeout(Rough) to extend the image recognition time.

Case D. A screenshot is displayed, but the position of the recognition target is different: The (target) app has been updated and the location of the recognition target has changed, or the recognition target is moveable. Please press the Retry button in the upper right corner and try changing the method to Search(Similarity) to search in the screen.
*If there are few patterns (there is no need to search), such as when only two positions appear, please add a new image control item for the location patterns.

Case E. A screenshot is displayed, but it looks like it should succeed: The reason why it fails is because “the color on the image data is different” or “the position is different”. Press the Retry button in the upper right corner, then; change the method to Color Similarity instead of Exact Match, adjust the similarity threshold if you have already set Color Similarity, or set Search(Similarity).


In case screenshot capture fails

*On apps that prohibit screen capture, any screen capture function will not work. On such apps, screenshot function cannot work even with the settings below.

Screenshot fails on Simple mode (Screen API)

Please try the following related settings.

  1. In Image control settings, Advanced Settings – First Delay: 0.3sec or such.
  2. FRep2 Options – Screenshot Settings – Avoid Dropping Images: Screen API or Apply to All.
Screenshot fails on Precision mode

Please try the following related settings, in order.

If the problem is not solved even with Screen API, refer the previous section for it.

Some touches are not replayed

In case the replay does not play touch (while the corresponding FRep2’s finger cursor is shown), the device or the running app may be unable to receive the touch input. Try inserting the wait time before the touch to wait for the state to accept input. You can insert Wait control, or set Advanced: First Delay in Image control or such, in Edit Sequence.

*In case Replay setting: Skip first wait is set in Edit Record, first wait seconds are ignored in replay. You can switch it to Replay initial wait by tapping it.

Cases where the device or application does not accept touch input:
  • Immediately after confirming permission for screen capture at the start of replay. (On Android ~9, it may occur even after checking ‘Don’t show again’ in the dialog for confirmation)
  • Screen transition is not completed, because of the high load on the device.

Current app is not recognized correctly / The replay stopped with ‘App Changed’, ‘Protected App’

In case the replay is interrupted with ‘App Changed‘ or ‘Protected App‘ while the app is not appeared, or another case the FRep2’s notification is always ‘[Restricted for Current App]‘, try switching System Settings – Current App Detection.

Or, if the detected app is correct but the replay stopped with ‘App Changed‘, see the record’s setting of Interruption – Abort on app change.

As for ‘Protected App‘, see the Apps to confirm the settings on which FRep2 is available.

Replay, FRep2 Service or FRep2 Accessibility Service stops irregularly.

After the problem occurs, please check the replay is aborted or not, or the services shutdown by error from the last log for the replay and/or Support Info*. Tap Status and select ‘Copy support info’ in the menu of System Info screen, to copy the detail status about last issue. Paste the copied text to some text editor or mailer app, to check the information.

  1. See LAST LOG in support info (or Last log for the record) to check if the last replay finished or not. If the result is not supposed, check the record’s settings.
  2. See LAST ERROR in support info, and check if the time and date is matched when the abnormal termination occurs. If there is error for the time, the error caused the shutdown of FRep2 Service or FRep2 Accessibility Service, so please send the support info to our support support(at)strai.x0.com.

If there is no error or abort log for the shutdown issue, it may be caused by battery optimisation setting or some specific performance configuration. To avoid force shutdown and keep running of FRep2 Service and FRep2 Accessibility Service, try setting FRep2 app in the white list.


Exclude FRep2 from battery optimisation

If there is BatteryOpt keyword in System info screen or support info, FRep2 Service and FRep2 Accessibility Service can be force shutdown by device’s battery optimisation.

  1. To see Android’s standard settings, tap Setup in navigation menu and Exclude from battery optimization in Optional steps, or Battery opt. in Related Settings Shortcuts at bottom.
  2. If FRep2 is not in Power-saving exceptions (or Not optimised) whitelist, set FRep2 in it. The procedure may be different depending on OS or such, generally changing the list type to All apps and select FRep2 in the list to switch to Exception (Don’t optimise).
  3. If BatteryOpt keyword remains after the setting above, check the device (maker) specific battery optimisation function, too.

Settings about device performance

If the problem still continues after the setting of exclusion from battery optimisation and there is no BatteryOpt keyword in System info, please check the app manager and/or performance settings to avoid force shutdown.

For device specific settings, especially Samsung Android 9~, Huawei, Xiaomi, Asus, please refer the external site Don’t kill my app! by experts, including the setting steps for each device.


Settings about Lock screen

After lock screen shown on some Android 10 environment, replay / record with Precision mode fail with ‘No reply from StrServ.’ message. Try setting of no lock screen in Android Settings, because the device stops StrServ process by Precision mode setup tool, when the lock screen is shown.


Steps to start FRep2 service without Accessibility Service

For environment on which FRep2 Accessibility Service does not work, or stops without error in support info, FRep2 Precision mode can work without Accessibility Service. Refer following steps.

  1. (If FRep2 Accessibility Service is ON) Tap Setup and Accessibility button at the bottom, then switch OFF FRep2 Accessibility Service.
  2. Tap Options and set Operation mode: Precision mode.
  3. Open Options – System Settings and set Current App Detection: Usage Stats (with Delay).
  4. Tap the cyan message of To detect App change, permit Usage Access. (Tap to open), or Usage access in Setup to open corresponding page in Android Settings, then select FRep2 to permit usage access.
  5. Setup Precision mode with Setup Tool.

Image control / Scene check is slow.

Image control and Scene check does “taking screenshot” and “image matching calculation”. For faster process, try related settings below.

Taking screenshot

When a popup message of replay process is shown, FRep2 clears it before taking screenshot. Notification Settings – Notify Replay Process: Show On Finish or Do not notify will hide the popup messages*, i.e. taking screenshot do not wait the clearing the popup messages. Or, you can set empty labels for items, for which you do not want to show popup message, in your sequence.

For precision mode, you can choose the Screenshot Method. Screen API may take screenshot faster than others. Note that if the timing of taking screenshot is too early after switching the method, try Advanced setting – First Delay for Image control, or First Delay in Scene Check for Scene check.

Image control

The speed of Image control depends on the amount of calculation. Generally, Exact Match < Match Pixels Rate < Color Similarity; as for search method, Search(Exact) < Search(Similarity). However, the methods of Exact or Pixels Rate are not effective for recent devices or apps, because the subtle difference exists by the app’s drawing method or the device’s lighting configuration, even if you look the 2 images are same.

For faster matching calculation of Exact, Match Pixels Rate, and Color Similarity, set smaller matching area rectangle, and/or mask unnecessary area for distinguishing the images.

For faster matching calculation of Search(Exact), and Search(Similarity), set Search Area from the lower button of Search method, to filter the unnecessary area (where no possibility the searching image appears). Please be careful that the masking of source image not necessary reduce the amount of calculation, because the candidates of matching area basically increases (by the method of characteristic points) though the cost of each matching with the candidate decreases.

Touch replay finishes without playing, in Precision mode

When FRep2 does not replay touches but shows ‘Finished’ in Precision mode, please refer followings.

– Do ‘Calibrate Input’

In FRep2 app, open Navigation menu and choose Calibrate Input and follow the shown instructions.  It will register and analyse the touch signals to switch the replay type for the touch input device.

If Calibrate Input is not in navigation menu, it has been already done, so see next section.  If you want Calibrate Input again, you can open it from Options.

 

– Set ‘Use hover signals’

In FRep2 app, open Navigation menu and choose Options – Precision Mode Settings, to change Use hover signals.  After the selected option matches the type of touch input device, the replaying touches will work.

* ‘Auto’ will choose the type from the result of Calibrate Input.

(Confirmed on Xperia Ace II, Android 11. Use hover signals: Off)

Zenfone Max (Pro) M2 (Android 8, 8.1)

FRep2 crashes on replaying records or sequences.
From the reports on some specific environments with Android 8 and 8.1, the notification popup (Toast) fails to be processed by Android OS (ref. StackOverflow).  Try setting Notify Replay Process: Do not notify in Options – Notification Settings.