Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9155573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:37:12+00:00 2026-06-17T12:37:12+00:00

Using Trigger.io’s barcode api in an application that only contains boilerplate HTML and the

  • 0

Using Trigger.io’s barcode api in an application that only contains boilerplate HTML and the following JavaScript:

forge.barcode.scan(function (value) {
    alert("You scanned: "+value);
});

I get the following error in the log:

Forge Java error: RuntimeException: Can’t create handler inside thread that has not called Looper.prepare()

Full error entry:

[INFO] D/Forge ( 1109): Returned: {“content”:{“message”:”Forge Java
error: RuntimeException: Can’t create handler inside thread that has
not called
Looper.prepare()”,”type”:”UNEXPECTED_FAILURE”,”subtype”:null,”full_error”:”java.lang.RuntimeException:
Can’t create handler inside thread that has not called
Looper.prepare()
at
android.os.Handler.(Handler.java:197)
at
android.os.Handler.(Handler.java:111)
at
android.app.Dialog.(Dialog.java:107)
at
android.app.AlertDialog.(AlertDialog.java:114)
at
android.app.AlertDialog$Builder.create(AlertDialog.java:931)
at
android.app.AlertDialog$Builder.show(AlertDialog.java:950)
at
io.trigger.forge.android.modules.barcode.API.scan(API.java:68)
at
java.lang.reflect.Method.invokeNative(Native Method)
at
java.lang.reflect.Method.invoke(Method.java:511)
at
io.trigger.forge.android.core.ForgeApp.callJavaFromJavaScript(ForgeApp.java:247)
at
io.trigger.forge.android.core.ForgeJSBridge$1.run(ForgeJSBridge.java:17)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at
java.lang.Thread.run(Thread.java:856)\n”},”callid”:”35E46BC5-1C17-4354-B09B-BE67B5FCD513″,”status”:”error”}

Update:

Below is my code:

File config.json

{
    "config_version": "2",
    "name": "Scan to Web",
    "author": "email@email.com",
    "version": "0.1",
    "platform_version": "v1.4",
    "description": "An empty app created by default",
    "modules": {
        "logging": {
            "level": "DEBUG"
        },
        "barcode": true,
        "contact": true,
        "file": true,
        "is": true,
        "media": true,
        "prefs": true,
        "request": {
            "permissions": ["http://*/*", "https://*/*"]
        },
        "tools": true,
        "reload": true
    }
}

File default.js

forge.barcode.scan(function (value) {
    alert("You scanned: "+value);
});

File index.html

<!DOCTYPE html>
<html>
    <head>
    <title>Hello World!</title>
    <link rel="stylesheet" href="css/jquery.mobile-1.1.0.min.css" />
    <script src="js/jquery-1.7.1.min.js"></script>
    <script src="js/jquery.mobile-1.1.0.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/default.js"></script>
</head>
<body>

    <p>Hello world!</p>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:37:13+00:00Added an answer on June 17, 2026 at 12:37 pm

    Try one of two things:

    1) Turn Reload module on in your app configuration. I know it sounds weird or stupid, but trust me, it should resolve your problem for now. I had very similar issue with Request module when Reload was off.

    2) Change “platform_version” in your src/config.json from “v1.4” to “v1.4.25”. I think last platform version is a bit broken.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day, SO. Using Trigger.IO's javascript SDK, is it possible to create a Forge
I am using following PHP code for trigger creation but always get error, please
I want to trigger javascript alert using PHP. Is it possible I want to
If I'm using a trigger to update one row, and it's only reading from
Started using Quartz.net in my project. But got stuck. Using cron trigger fires only
I'm using a trigger to store changes in an audit table, I only want
I am trying to create a mysql trigger using MAMP for a joomla2.5 application.
Is it possible to detect private browsing mode on Internet Explorer using Forge Trigger.IO's
I am using Trigger.io to develop an application. After using file.getImage and selecting an
I am using INSERT Trigger on that table. Once trigger is executed (it update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.