Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: 1 2 [3] 4 5 ... 10
 21 
 on: October 28, 2024, 03:18:34 pm 
Started by Richard M. - Last post by Richard M.

The path that seems to work is '/sdcard/Pictures'

 22 
 on: October 24, 2024, 06:01:40 pm 
Started by Christine R. - Last post by Christine R.

 
Genero Studio Client issue



Dear customers,

We have detected an issue on Genero Studio 4.01.06 Client on Windows only.

We invite you to refer to the issue tracker to get more information about this issue:
https://4js.com/support/issue/?id=GST-19696
This issue has been fixed in the patch1 for GST that you need to apply on your installation if you encounter this issue.
The patch can be downloaded in the GST section here.

For more information about this patch, please refer to https://4js.com/online_documentation/fjs-gst-4.01.06-patch1-readme.txt.
 
All Four Js Genero customers under maintenance have free access to the new release.
 
Best regards,
 
Four Js Development Tools

 23 
 on: October 23, 2024, 12:16:16 pm 
Started by Richard M. - Last post by Richard M.

Our application uses ui.Interface.frontCall( "mobile", "takePhoto", [], [path] ) to enable a photo to be taken using the device camera.

path is an 'opaque' location of the photo on the device which is available for use in the current iteration.

An example of the path returned is 'content://media/external_primary/images/media/457?name=JPEG_GMA_20241022_170235.jpg&ext=jpg'

I was hoping to use os.Path.delete() to remove the picture, but the path above looks like a URL and is invalid when used in os.Path.delete().

Any ideas on how to do this?

Thanks

 24 
 on: October 23, 2024, 10:57:02 am 
Started by Richard M. - Last post by Sebastien F.
Hello Richard,

Regarding os.Path.delete() of a filename returned by takePhoto / choosePhoto:

I cannot help I am not expert for GMA/GMI internals.

Seb

 25 
 on: October 22, 2024, 06:34:57 pm 
Started by Richard M. - Last post by Richard M.
Hello Richard,

Can you please provide the context (Genero version, Front-ends type and version, DB servers type and version, OSes type and version, etc) - We can better help if we know the context and such "details".

I was wondering why you need to convert the image data to base64.
I assume this is to send the images as plain text to the server?

About using IMPORT security:

While security.Base64.FromByte() needs the BYTE to be located in memory, DISPLAY BY NAME needs the BYTE to be located in a file:
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_images_dynamic_images.html
Section "Displaying images contained in BYTE variables"

Since Genero BDL 2.51, we have util.Strings methods to encode/decode in base64.

https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ext_util_Strings_methods.html

Except if you really need other APIs of the "security" module in your mobile app, I would just use the "util" package.

How to you plan to upload the photos to the central database?
Using RESTful Web Services?

What is the SQL CREATE TABLE DDL for the local mobile l_photos table and its equivalent on the server side to store photos?

Seb

Thanks Seb,

The image is indeed converted to base64 so it can be sent as text via Web Services. 

I altered my code to use util.Strings.base64Encode and it works fine.

One additional issue/question;

I want to use the path returned from ui.Interface.frontCall( "mobile", "takePhoto", [], [path] ) to delete the picture held on the Android device after it has been processed.

An example of the path returned is 'content://media/external_primary/images/media/457?name=JPEG_GMA_20241022_170235.jpg&ext=jpg'

I was hoping to use os.Path.delete() to remove the picture, but the path above is invalid.

Any ideas on how to do this?

Thanks

 26 
 on: October 22, 2024, 10:08:55 am 
Started by Richard M. - Last post by Sebastien F.
Hello Roland,

Quote
are there any substantial differences between the routines of the util.Strings and security.Base64 packages? What's the (dis)advantage of using one of the two packages?

There should be no differences regarding pure base64 encoding/decoding. However, as mentioned by Reuben, there is a constraint with security.Base64.FromByte()/ToByte() requiring the BYTE to be located in memory.

I see an advantage on using util.Strings because there are less dependencies to other libs, if you need only to do base64 conversions.

Here the deps of the security.so library on my Linux box:

Code
  1. $ ldd -r $FGLDIR/lib/security.so
  2. linux-vdso.so.1 (0x00007ffcb99cd000)
  3. libfglutils.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libfglutils.so (0x00007fa30a200000)
  4. libfglsecurity.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libfglsecurity.so (0x00007fa309e00000)
  5. libfglgws.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libfglgws.so (0x00007fa309a00000)
  6. libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007fa309400000)
  7. libfgl.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libfgl.so (0x00007fa309000000)
  8. libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa30a8f0000)
  9. libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa308c00000)
  10. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa30a811000)
  11. libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa30a5e0000)
  12. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa30a01f000)
  13. libiconv.so.2 => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libiconv.so.2 (0x00007fa308800000)
  14. libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007fa30a537000)
  15. libfgltransport.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libfgltransport.so (0x00007fa308400000)
  16. libfglxml.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libfglxml.so (0x00007fa308000000)
  17. libxml2.so.2 => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libxml2.so.2 (0x00007fa307c00000)
  18. libxslt.so.1 => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libxslt.so.1 (0x00007fa307800000)
  19. libwrtl.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libwrtl.so (0x00007fa307400000)
  20. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa30a808000)
  21. /lib64/ld-linux-x86-64.so.2 (0x00007fa30a912000)
  22. libxmlsec1-openssl.so.1 => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libxmlsec1-openssl.so.1 (0x00007fa307000000)
  23. libxmlsec1.so.1 => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libxmlsec1.so.1 (0x00007fa306c00000)
  24.  

Versus libfgl.so, where the IMPORT util package is built-in:

Code
  1. $ ldd -r $FGLDIR/lib/libfgl.so
  2. linux-vdso.so.1 (0x00007ffce853e000)
  3. libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2745ca0000)
  4. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2745bc1000)
  5. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2745bbc000)
  6. libwrtl.so => /home/sf/genero/software/fglgws-5.00.03-NB/lib/libwrtl.so (0x00007f2745400000)
  7. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f274521f000)
  8. /lib64/ld-linux-x86-64.so.2 (0x00007f2745cc0000)
  9.  

Quote
I wasn't aware that both packages contain the same routines. Couldn't the documentation of the security.Base64 package point out to use the routines from util.Strings?

I will talk to the doc team about that, but usually we want to keep things independent.
You should be able to find all pages related to base64 support by using the doc search field.
Just try with "base64".

Quote
Apart from that, the parameters are described differently in the two packages. For example, the security.Base64.LoadBinary() (https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_SecurityBase64_LoadBinary.html) function specifies the parameter “path”, while the util.Strings.base64Encode() (https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ext_util_Strings_base64Encode.html) function is called with the parameter “filename”. With the latter, it is not explicitly pointed out that the filename can also access network resources. Perhaps the documentation of the two packages could be standardized accordingly..

You make a good, point but this is not a doc problem but rather an implementation problem:
The signature these methods uses different parameter names
You can see this by using code completion in vim, GST or VSCode.

Best regards,
Seb

 27 
 on: October 22, 2024, 09:05:24 am 
Started by Richard M. - Last post by Roland W.
Sebastien,

are there any substantial differences between the routines of the util.Strings and security.Base64 packages? What's the (dis)advantage of using one of the two packages?
I wasn't aware that both packages contain the same routines. Couldn't the documentation of the security.Base64 package point out to use the routines from util.Strings?

Apart from that, the parameters are described differently in the two packages. For example, the security.Base64.LoadBinary() (https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_SecurityBase64_LoadBinary.html) function specifies the parameter “path”, while the util.Strings.base64Encode() (https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ext_util_Strings_base64Encode.html) function is called with the parameter “filename”. With the latter, it is not explicitly pointed out that the filename can also access network resources. Perhaps the documentation of the two packages could be standardized accordingly..

Kind regards
Roland

 28 
 on: October 22, 2024, 08:24:00 am 
Started by Richard M. - Last post by Sebastien F.

Note that when running on mobile, you can directly display the opaque filename returned by the takePhoto or choosePhoto front call.

Warning: you must remove UNBUFFERED mode in the main.4gl sample, otherwise the BYTE variable automatic display will take place.

Code
  1.        ON ACTION take_photo_disp
  2.           CALL ui.Interface.frontCall("mobile","takePhoto",[],filename)
  3.           IF filename IS NOT NULL THEN
  4.              INITIALIZE rec.* TO NULL
  5.              LET rec.name = filename
  6.              DISPLAY filename TO photo
  7.           END IF

But that opaque filename is only valid during the lifetime of the app instance.

If you want to store the images in the local database to keep it persistent, you have to store the BYTE data (or the TEXT in base64, if there is any good read for that)

Seb

 29 
 on: October 21, 2024, 04:28:35 pm 
Started by Richard M. - Last post by Sebastien F.

Attached a sample using takePhoto / choosePhoto front calls and displaying the photo.

If someone has a better way to do this for mobile apps, suggestions are welcome.

Seb

 30 
 on: October 21, 2024, 03:12:01 pm 
Started by Christine R. - Last post by Christine R.

 FourJs License Manager  6.00 -  Maintenance Release
Maintenance Release


Four Js is pleased to announce a Maintenance Release of Four Js License Manager and License Controller 6.00.22.

What's new ...
A new package for macOS ARM is now available. The Operating System code is m64a1200.
m64a1200 and m64x1200 packages are now tested on macOS 15.x.

These versions are now downloadable from the Four Js web site : https://4js.com/download/products/.

All Four Js Genero customers under maintenance have access to the new release.

Best regards,

Four Js Development Tools

Pages: 1 2 [3] 4 5 ... 10
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines