1. Announcing Mekorama on the Web!

    Now anyone can play levels from the forum online, with one click!

    Dismiss Notice
  2. Psst! If you're new here, welcome! Please visit these pages first for information about the forum and Mekorama:

    Welcome! ¡Bienvenido! Selamat datang! Добро пожаловать! Willkommen!
    and
    Everything you want to know about Mekorama

    Dismiss Notice

Question about the camera for QR codes

Discussion in 'Off Topic Lounge' started by GiyomuGames, Jun 8, 2017.

  1. GiyomuGames

    GiyomuGames New Member

    Messages:
    6
    Likes Received:
    10
    Joined:
    Jun 8, 2017
    Hello there!

    I'm currently making a game for android in Unity and I am also going to use QR codes for the levels. I was very surprised when I installed Mekorama that it didn't ask for a permission to use the camera nor to take pictures. And it didn't ask anything when I used the feature itself. Does anyone know how Martin Magni managed to open the camera and take a picture without requesting this permission?

    Sorry for the very specific question and thanks for the help if any :)
     
  2. Gepeto

    Gepeto MekoStudio Architect Staff Member

    Messages:
    453
    Levels:
    48
    Albums:
    1
    Likes Received:
    2,510
    Joined:
    Jul 7, 2016
    You're right and it should be required as specified here.

    Fact is that @Martin Magni developped his game in C language, not in Java. Not really often nowadays to find someone working on low level technilogies like that but that's also the reason why the file application size is really tiny, so a real amazing work. Maybe is there something related to that?

    Another reason could be that he uses Barcode components by Cognex Corporation. So technically speaking this is not the app itself which uses the camera. Indeed I am surprised that the application doesn't have to request authorisations and is allowed to use it even if it is through a component.

    @Martin Magni should answer on that :)
     
  3. GiyomuGames

    GiyomuGames New Member

    Messages:
    6
    Likes Received:
    10
    Joined:
    Jun 8, 2017
    Thanks a lot Gepeto for your answer! I saw after I posted also that in the android spec it says "Note: If you are using the camera by invoking an existing camera app, your application does not need to request this permission.". So I guess that is what Martin is doing.
    I'm going to try to see if I can start the default camera from the code in Unity. It seems feasible! :)
     
    Azka Fauzan Firdaus and HackedUp like this.
  4. GiyomuGames

    GiyomuGames New Member

    Messages:
    6
    Likes Received:
    10
    Joined:
    Jun 8, 2017
    I figured it out! It was indeed just a matter of calling the default camera, but it's a bit more complicated in Unity than it is in a native android application. I have put the solution code on github "Unity-for-Android-Read-Write-QR-Code-from-Camera"!
     
    Last edited: Jun 11, 2017
    QuantumForce, HackedUp and nGord like this.
  5. GiyomuGames

    GiyomuGames New Member

    Messages:
    6
    Likes Received:
    10
    Joined:
    Jun 8, 2017
    Hello hello!

    I have finished my game for android so don't hesitate to check it out. It has a puzzle editor and QR codes like in Mekorama (from where I got the inspiration for this feature! :)).

    Google Play Link: https://play.google.com/store/apps/details?id=com.giyomu.frogtactics

    The facebook page where I put new levels once in a while (and you can too!): https://www.facebook.com/frogtactics/

    Trailer et gifs in the spoiler

    Trailer:

    (the quality is better in the game than in the gifs! ^^)
    [​IMG] [​IMG] [​IMG] [​IMG]
     
    Last edited: Jul 23, 2017
    QuantumForce and sawdust like this.

Share This Page