question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility to open the correct application, depending on the content of the code read

See original GitHub issue

Hi,

After scaning a barcode, can you add a button to open the application in connection with the code read.

Examples :

  • if the code contain an URL → the button can open the webbrowser
  • if the code start with mailto: → the button can open the mail client
  • if the code is a vCard BEGIN:VCARD → the button can open the contact app

You can see some other one on this page : https://github.com/zxing/zxing/wiki/Barcode-Contents

Thanks !

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jas14commented, Jul 3, 2019

For what it’s worth, just opened #40 , which adds a WiFi connect button and should also make it easier to add actions for other custom data types mentioned above (e.g. contacts, events)

1reaction
molikunercommented, Jun 3, 2019

@markusfisch Thank you for this reference. I have already found this implementation of WIFI support. If you agree, I would implement it in the next few days. The app would need some additional permissions:

  <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

After looking at the calendar and contacts, I’m not quite sure if you should fully support them. The problem is that many tags in these vFormats become very complex. The ZXing Android app implements only partial support (e.g. calendar). The contacts are a bit special, because you don’t have to implement a real parser. There is a way to share a .vcf file with the contacts and import it. To open the contact afterwards, you just need to give the app an additional permission to search for that contact. But keep in mind that you probably don’t want to do this because the contact app imports the specified file asynchronously and you can’t be sure if the contact has already been added or will be added in the next few seconds. This means that the only nice implementation would be a parser for the contacts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App Store Review Guidelines - Apple Developer
For everything else there is always the open Internet. If the App Store model and guidelines are not best for your app or...
Read more >
Making decisions in your code — conditionals - MDN Web Docs
In any programming language, the code needs to make decisions and carry out actions accordingly depending on different inputs.
Read more >
Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >
How to debug for absolute beginners - Visual Studio
Step through your code in debugging mode to find where the problem occurred. When you normally run an app, you see errors and...
Read more >
Application Fundamentals - Android Developers
App components are the essential building blocks of an Android app. Each component is an entry point through which the system or a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found