[FREE] 🖨️ QR Generator!

Introduction

This image MIT App Inventor extension helps you generate a link which redirects to your QR code.

For similar extensions, click on the links below.

Note: Since it generates a link, to display the image, you need internet access.

Create QR code without network extension by Zhangqs

Create QR code without network extension by vknow360

Extension Info

Version: 2

Package name: com.gordonlu.qr

Documentation

AvailableFormats

image
Available formats for your QR code. Available types of QR codes are UTF-8, Shift_JIS and ISO-8859-1. Returns: list

GenerateQRLink

image
Generates a link for your QR code. Returns: text

Parameters: height | text, width | text, code | text, type | text

Available types of QR codes are UTF-8, Shift_JIS and ISO-8859-1. Placing an empty text string will make it UTF-8.

Note: Do not use number blocks for height and width, since they cause errors. This bug will be solved. Use text blocks instead.

Usage Example

Download Sources

TXT file: QR.txt (1.9 KB)

AIX file: com.gordonlu.qr.aix (6.1 KB)

AIA file: QR.aia (6.7 KB)

Successfully tested on Xiaomi 5G NE Lite.

Source code:

package com.gordonlu.qr;

import android.app.Activity;
import android.content.Context;
import com.google.appinventor.components.annotations.*;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.runtime.EventDispatcher;
import java.util.*;  

@DesignerComponent(
        version = 2,
        description = "This extension helps you to generate a valid link for your QR code.",
        category = ComponentCategory.EXTENSION,
        nonVisible = true,
        iconName = "https://docs.google.com/drawings/d/e/2PACX-1vQCI87PHLBF0jb8QWyYmIRQSjjNW3EFXf-qpsWCvBYkUQ9vEgPAB8SpxcMpblxNpbIYrjCjLrRLIU2c/pub?w=16&h=16")

@SimpleObject(external = true)
//Libraries
@UsesLibraries(libraries = "")
//Permissions
@UsesPermissions(permissionNames = "")

public class QR extends AndroidNonvisibleComponent {

    //Activity and Context
    private Context context;
    private Activity activity;

    public QR(ComponentContainer container){
        super(container.$form());
        this.activity = container.$context();
        this.context = container.$context();
    }

    @SimpleFunction(description = "Returns all available formats of the QR code.")
    public static List<String> AvailableFormats () {
         List<String> formats = new ArrayList<>();
          formats.add("UTF-8");  
          formats.add("Shift_JIS");  
          formats.add("ISO-8859-1");  
    return formats;
    }

    @SimpleFunction(description = "Generates a link for the QR code.")
    public String GenerateQRLink (String height, String width, String code, String type) {
        String make = "https://chart.googleapis.com/chart?cht=qr&chs=" + height + "x" + width + "&chl=" + code + "&choe=" + type;
    return make;
    }

}

Made with Niotron IDE.

Kindly :email: PM me if you have any questions! Also, if you like my extension, please :heart: like it! It takes some effort for me to make it...

This extension is registered on my website. Check that out!

13 Likes

A link to the aix would be helpful :wink:

2 Likes

Oh sorry.. I almost forgot it...

Edit: Updated, thank you!

2 Likes

Does the extension need a network connection to generate the qr code?

It is taking up to 15 seconds to generate the code for me

3 Likes

It does not need network connection to generate the link, but it needs network connection to show the QR code.

2 Likes

Very easy to use the extension
Thanks @Gordon_Lu

1 Like

Great Extension @Gordon_Lu

2 Likes

Version 2 updated! New blocks added to topic.

3 Likes

Can you show your blocks?

@Gordon_Lu can you tell
What is the different between version1 and version 2

1 Like


Changed the blocks...

3 Likes

@Gordon_Lu your extension is not too bad :zipper_mouth_face:
I hope in the future you don't make an extension functions
that can be made with (Built-in Block). :wink:


:point_down: Have you read this guide well?

🟥 ##PLEASE READ FIRST## Posting a new extension to the community

3 Likes

A doubt, does it generate QR Scannable Code or generate a link from a QR code(ID)?

3 Likes

It generates a link for the QR code.

4 Likes

For more information see my website. If you want to post something, PM me instead.

1 Like

Topic re-opened, queries regarding this extension should be shared with the community, in order to help others.

1 Like

No longer supported.