Qr : Read and Create Bar Code offline

Hi @Nader_El-Sayed
After reading this:

I am totally confused between main memory and external storage(sd card).
Can you solve my confusion?

1 Like

@vknow360 The main memory is the memory integrated with the phone and its path in my phone (/storage/emulated/0)

sd card is the card that is placed in the phone to increase the space and its path in my phone (/storage/D08E-901D)

and this is a test by taifun file extension >>>>

a072a36a638133f736e7c559b38f3cff4ae8ddce_2_250x500

@vknow360 The problem is that when using your extension, the extension adds an automatic path (/storage/emulated/0) to any other path that the user enters in any way …

One more question…
Where is qr generated with extension?
In phone memory or external storage.

No need to generate one by your extension , I downloaded one from the internet and tried it on both paths … In the main memory it worked properly … As for the sd card it did not work because of the path @vknow360

ChangeLog Version 2

Changes/Bug Fixes

  • Replaced relative filePath with abstract filePath in DecodeQrCode and DecodeBarCode methods.But both Generate methods still use relative filePath.

Thanks to @Nader_El-Sayed and @Taifun

3 Likes

you are welcome , thank you my friend @vknow360

1 Like

java error appears when scanning qr. THE SCANNER DOESN’T WORK!

Can you elaborate more about error?

1 Like


Does not read QR. java error

I think you have not asked for READ_EXTERNAL_STORAGE permission.

You Should Add @UsesPermission(permissionNames =“android.permission.READ_EXTERNAL_STORAGE”) Below @SimpleObject in Your Java File​:slightly_smiling_face:

Hi @Androking
Thank you for your advice :slightly_smiling_face:
I already use UsesPermission annotation.
As we all know it does not asks for permission and instead of that it adds permission to manifest.
But I liked your idea and in the next version it will automatically ask for Read/Write permissions if they are not asked by app.

1 Like

This post was flagged by the community and is temporarily hidden.

@chandilarocky09 stop spamming all threads stick on your original post nand be patient.

4 Likes

It is always good idea that a component or extension automatically requests the required permissions.

But if this is the case, the .PermissionGranted event is not triggered. To guarantee this (for whatever reason), you have to ask for this permission manually (expressly), in your case: android.permission.WRITE_EXTERNAL_STORAGE.

This is sufficient because it implicitly grants READ permission.

https://developer.android.com/reference/android/Manifest.permission

See also here:

1 Like

ChangeLog Version 3

New methods

  • Added BarcodeFormats method

Changes

  • Removed Qr related methods and events.Now you can generate qr using GenerateBarCode method by using QR_CODE as barFormat.
  • Now it will automatically ask for Read and Write permissions if they are not granted/enabled.
    Thanks to @Androking and @bodymindpower :heart_eyes:
Summary

Everyone tries to add/increase features in next version but probably I am the first who tries to remove features in latest versions :innocent:

1 Like

it may be useful for beginners. I did this. sending the result to social networks

blocks

2 Likes

Hi @vknow360,

First of all thank you giving this AIX for free. I am very new to Kodular and this is my very first post here asking for guidance for all the gurus reading this post.

@vknow360 I am testing and trying to test your AIX but got stuck. The QR code was NOT generated under Screen.Initialize BUT no issue with Button.Click.

This could be easy for some but been trying for couple of days now, thanks for all the help in advance!

Hi @clem.sabarias Welcome to Kodular Community
I have not tested that method on Screen.Initialize so I can’t say why it does not works.
Try using a clock at screen initialize and creating bar after timer.
Can you send me a sample apk?

1 Like