Coder Social home page Coder Social logo

abhishekabhi789 / gcs_for_tasker Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 336 KB

An Android application built using the Google Code Scanner API to scan QR codes and barcodes. It can function as both an event and action plugin for Tasker.

Kotlin 100.00%
qrcode-scanner tasker-plugin taskerplugin google-code-scanner android tasker

gcs_for_tasker's Introduction


GCS for Tasker

API 21+ GitHub all releases GitHub release (latest by date including pre-releases) demo project download
GCS for Tasker is an Android application that can act as both a Tasker event plugin and action plugin. This app uses the Google Code Scanner API to scan and extract information from QR codes.

โš™๏ธ Requirements

This is a Tasker Plugin, and it requires the Tasker Android app to function. To use this app, you must have an Android device with an API level of 21 or higher, as the Code Scanner API works on devices with this API level or above. Furthermore, it is necessary to have the Google Play Services installed on the device.

๐Ÿ’ก Features

With the GCS for Tasker app, you can easily integrate QR code scanning into your Tasker projects. This app supports both scanning events and actions. This app doesn't ask for camera permissions, nor does it store or share any data except with Tasker.

๐Ÿงฌ Variants

There are two variants available for this project based on the theme used in event configuration activity. Classic themed app is smaller in size and material themed app is around 4 times bigger. Both are having same package name and are signed with same key, you can switch them anytime. It's recommended to clear the app data after such switching to release storage space consumed by previous variant.

๐Ÿ› ๏ธ How to Setup

Install this plugin app and Tasker.

In Tasker

  • For events, select the "Event" option, then choose "Plugin" and select "GCS for Tasker" from the list. From there, you can configure the event based on your preferences.

    • Value filter: The event will trigger only when the raw value of the scanned code matches the value filter. This field supports both simple and regex matching. Adjust the switch next to this field to choose simple matching or regex matching.
    • Type filter: The event will trigger only when the qr code type matches any of the type filter. Refer Barcode.BarcodeValueType for more about code types.
    • Format filter: The event will trigger only when the code format matches any of the format filter. Refer Barcode.BarcodeFormat for more about code formats.

    The event will trigger only if all specified filters are satisfied.

  • For actions, select "Plugin" from the "Select action category" list, and then choose "GCS for Tasker". Then on the configuration activity you can configure below settings.

    • Format filter: The code scanner will only detect codes having the chosen format.
    • Enable auto zoom: The scanner will try to automatically zoom the camera towards the code.
    • Allow manual input: The scanner allows manual input of code value.

All the code types and code formats can be copied from event and action configuration.

In GCS for Tasker

After completing the Tasker setup, try to perform a scan.

  • If scanner modules are present, you will see the camera opened with the Google Code Scanner UI.
  • If scanner modules are absent, you will see a toast message saying "Waiting for the Barcode UI module to be downloaded."
    • This download is a background task and is handled by the Google Play Service. You won't be notified when the task is completed.

Here's an example project. Import it from TaskerNet

โ“ FAQ

Can this be used on a device that does not have Google Play Services?

No, the app uses the unbundled Google code scanner API provided by Google Play Services on the device.

Does the app require an internet connection to function?

This app does not require an internet connection since the scanner library is capable of working offline. However, Google Play Services requires an internet connection to download QR scanner libraries if they are not already present on your device.

Does clearing app data delete any setup or data?

For API 25+(Android 7.1+) devices, the shortcut configuration will be cleared when cleaning app data. No scanner related functionalities affected with clearing app data. All configuration data is stored in Tasker and the scanner library is in google play services. Also, if you want to save the scan results, you have to set up a Tasker task to do so.

๐Ÿ”ง Troubleshoot

Scanner module not downloading.

  • Ensure internet connection.
  • Ensure battery saver is turned off.
  • Update play service if available.
  • Reboot device.

If problem persists try

  • clearing the data of Google Play Services (Attention!: Use caution when deleting)
  • Upgrade or downgrade Google Play Services.

Code Scanned but no response from Tasker.

  • Try a different code to make sure the tasker setup is correct.
  • Check Tasker run log.
  • Try both event and action.
  • Create a new event/action without any filter rules and flash the output.

Scanner UI doesn't dismiss after action timeout.

The library does not provide a method to programmatically close or set a timeout for the scanner. You can consider using Tasker/AutoInput to click the close button or the back button after the action fails due to timeout.

Error: Failed to scan code.

If the scanner throws 'Failed to scan code' error, try clearing the app data of Google Play Service. It's a Google Code Scanner module related issue

gcs_for_tasker's People

Contributors

abhishekabhi789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gcs_for_tasker's Issues

Error message when trying to scan through tasker.

16.05.06/LicenseCheckerTasker Checking cached only
16.05.06/LicenseCheckerTasker cache validity left -431365
16.05.06/LicenseCheckerTasker Cached status: Licensed
16.05.06/LicenseCheckerTasker Cached only: Licensed
16.05.06/E FIRE PLUGIN: Scan Action / com.twofortyfouram.locale.intent.action.FIRE_SETTING: 8 bundle keys
16.05.06/E Scan Action: plugin comp: com.abhi.gcsfortasker/com.joaomgcd.taskerpluginlibrary.action.IntentServiceAction
16.05.06/Ew add wait type Plugin3 time 60
16.05.06/Ew add wait type Plugin3 done
16.05.06/E handlePluginFinish: taskExeID: 3 result 3
16.05.06/E pending result code
16.05.06/E add wait task
16.05.06/E Error: 2
16.05.06/E Failed to scan code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.