User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: [Request] QR Codes Generator Extension

  1. #1
    Clicker Fusion 2.5
    dogen's Avatar
    Join Date
    Jan 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request] QR Codes Generator Extension

    I'm not sure if this is the right section to post this kind of question. if not, please move the topic!

    Anyway, i'd like to know if it is possible to have a QR code generator extension for iOS and Android exporters.

    Thanks in advance!

  2. #2
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi
    if you work with a server you can make it very easily with the get object, php script and fastloop

  3. #3
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had headach with the same problem, and I can't wait until a hero create these extension so I will explain you my solutions even if it's not exactly what you request... :

    Solution 1- You don't have a server :

    you can symply use google API with the webview object : https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=your%20string%20here
    With these method, you just have to download the qr code generated by google.


    Solution 2- You have a server and want do it yourself

    for my project I didn't work with google API for 2 reasons
    I have to send / recieve sensitive data, and I want to set myself the qr code setting.
    all exchange between my server and app are always crypted; but I will not show you these for more simplicity

    I used this API and these tutorial (in french, sorry if you can't unterstand... I will explain you)

    a- install these directory and its PHP script on your server for exemple in your www direrctory
    b- install the following php scripts in the www directory

    in my case I need two type of Php scripts :
    • 1 that output directly create the qr code as an png picture that can directly donwload with the webview object (>> solution A)
    • 1 that output the qr code as an text where the black square are 1, and the white are 0. (>>solution B)





    ------------------------------------------------------------------------------------------------solution A
    ------------------------------------------------------------------------------------------------------------
    ---------------------------------------------------------------App create a qr code and download it

    in this exemple the application will create an qr code and download it as an PNG image.

    1- create a directory where the created png will be stored (in my exemple I create the directory "created-qrcode-directory "
    (we have now in our server 2 directory one with the QR code library : "qr-code", and a second where will be stored the generated qr codes : "created-qrcode-directory")
    these two directories are in the www directory of your server

    2- put this php script in your www directory (not in the "qr-code" or "created-qrcode-directory" directories !!! it must be in the www directory (or directory parent from the two others...))

    PHP Code:
    <?php 
    include "phpqrcode/qrlib.php";
        include(
    'config.php');
        
    // how to save PNG codes to server
            
    $tempDir "created-qrcode-directory/";
    $input $_POST['input'];
    $file $_POST['file'];
    $codeContents $input;
    // generating     
    QRcode::png($codeContents$tempDir.$fileQR_ECLEVEL_L);
    // end displaying     
    echo 'done';  
    ?>
    yes I know it's dirty... but I am not super programmer...

    Now your app can download the Qr code you want where you want.

    I create a little exemple here where it create "coucou" qr code and download it as "coucou.png"...

    Notice that you can change the correction level ( L, Q, H...) or the margin as you want ; refer to the documentation of the API...






    ------------------------------------------------------------------------------------------------solution B
    ------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------App create dynamically the qr code itself

    now, if you don't want that your app download a picture but that it create directly the qr code (for exemple to customize the square ect...) then maybe my solution B will interest you :
    We will output a list of 0 and 1 that will represent the square of the qr code, and then with a active object create directly the qr code

    1- put the following PHP script in the www directory of your server (not the directory of the library!!) :

    PHP Code:
    <?
    phpinclude "phpqrcode/qrlib.php";
    $input = $_POST['input'];
     // text output       
    $codeContents = $input;
     // generating     
    $text = QRcode::text($codeContents);
     // displaying          
    echo join("", $text);
          ?>
    'I know, it's dirty.... I am not a super programmer ..... )

    2- Now we will create an app that will use that PHP script to generate a Qr code ;


    -----------------------------------------------------------------------------

    Notice, for those who have no server; that you could use my server scripts so long it's for fair use and test only.

    And sorry for my bad english practice

    Qr-code-solution-A.mfa

    Qr-code-solution-B-Solution-B.mfa

  4. #4
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for those who want to build an qrcode object extension these documentation/tutorial might be interessing

  5. #5
    Clicker Fusion 2.5
    dogen's Avatar
    Join Date
    Jan 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your thorough answer! I guess i'll go with solution 1 and use google API, it seems way easier.

    It'll only work on android, right? (since there's no web view object on iOS)

    Thanks again!

  6. #6
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh.... ****.... no Webview in IOS

    The solution B it's not so difficult as you think; you just have to put php scripts on your server, and then use the litle code to generate so long qr code you want with GET object.
    so it will be cross platform, and with an array you can custom it to create funny qr codes .

    after you put the library and the script to your server, (if you have no you could use mine) you just have to give some simple parameters, depend of your projects :

    that for an exemple for a project that display a big qr code

    qr-code-solutionB-explain.jpg

    then simply put the parameter in the value / string :

    qr-code-solutionB-explain2.jpg

    then when running it creat it directly :

    qr-code-solutionB-done.jpg

    It's appaer like complicated but in reallity it's very easy and you will have cross plateform qr code.

  7. #7
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    with solution B and checking north/south/east/west of the target cell; you can easily create customize Qr code like chuckie-cheese-qr.jpg

  8. #8
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in line 10 was an error, I correct it : Qr-code-solution-B-Solution-B.mfa

    notice that the Qr Pixel must always be √qr total size

    notice.jpg

  9. #9
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1- With Google API

    1- you access to google api giving it the size and string to code
    exemple with "hello world! "
    https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=hello%20world!%20

    then you can display/ download/ /use it with WebView object.

    2- Without Google API
    A- your app direct download a qr code


    1- you upload the qr library in your server qr-code.zip
    2- you write the php.script --> the first php script

    PHP Code:
    <?
    php include "phpqrcode/qrlib.php";
    include('config.php');
    // how to save PNG codes to server
    $tempDir = "created-qrcode-directory/";
    $input = $_POST['input'];
    $file = $_POST['file'];
    $codeContents = $input;
    // generating
    QRcode::png($codeContents, $tempDir.$file, QR_ECLEVEL_L);
    // end displaying
    echo 'done';
    ?>
    3- app : you access this php script with GET (POST) and download the qrcode with WebView.

    Qr-code-solution-A.mfa



    B - your app create the qr code during it is running

    1- you upload the qr library in your server (if it was not made before)
    2- you write the php script for displaying qr code as an 1 an 0 string "1111010101...." ---> the second php script

    PHP Code:
    <?php
    include "phpqrcode/qrlib.php";
    $input $_POST['input'];
     
    // text output       
    $codeContents $input;
     
    // generating
         
    $text QRcode::text($codeContents);
     
    // displaying
    echo join(""$text);
    ?>
    3- app : you access this php script with GET (POST) and run fast loops that create the qr code

    Attachment 19009
    Attached files Attached files

  10. #10
    Clicker Fusion 2.5Android Export Module
    hamdi369's Avatar
    Join Date
    Feb 2015
    Location
    Strasbourg France
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for my project, I try with 2A and 2B

    But 2A is slow, too heavy, little unstable and not cross platform so long it's no webview in IOS...

    2B is fast, lignt, stable, and cross platform, and permit to work with qr codes ( for funny custom qr codes) so I surely work just with it :

    Screenshot_2016-01-28-08-50-43.jpg

Page 1 of 2 1 2 LastLast

Similar Threads

  1. [New Extension] Random Names Generator
    By byo in forum Extension Development
    Replies: 14
    Last Post: 14th October 2013, 02:26 PM
  2. C++ Extension to Java/Flash Template Generator 1.3
    By Anders in forum Extension Development
    Replies: 1
    Last Post: 16th July 2010, 03:13 AM
  3. C++ Extension to Java template generator
    By Anders in forum Extension Development
    Replies: 3
    Last Post: 1st June 2009, 09:26 PM
  4. REQUEST: BEEP TONE GENERATOR
    By Tuna in forum Extension Development
    Replies: 15
    Last Post: 10th November 2008, 12:14 AM
  5. Replies: 1
    Last Post: 17th September 2008, 12:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •