[F/OS] ⚠️ DaffyDialog - Additional Features For The Notifier Component!

I was quite confuse by the fact that paths and permissions work differently using companion, apk and also in different Android releases, now I am a little bit more comfortable with them but I am still confused by the different behavoiur of different components about what they require to work correctly, I do not think I am alone to be confused but I can understand that is difficult to change everything to work and to behave in the same way.

What components are we talking about here?
This is an extension and it cannot read the icon from the assets with the APK. And neither just with the file name nor with the full path "file:///android_asset/icon.jpg" (because, as already mentioned, this only works with the webviewer).

Please, look at the aia.

If you mean me, I assure you that I had a good look at your aia before I made my comment.

Ok, perfect. I mean that Image is able to load any image I put in the Media files of the app without I had to specify the full path. If you look how I set the icon to be displayed by Image you will see I did not specify a full path but it works in companion and apk without any difference. Using the same approach for DaffyDialog does not work as is for many other components and extensions.

:question:

And what does that mean? (The full path also works.)

And again: Which other components?

Hi, I am not able to use the ShowLinearProgress dialog, at least I am not able to see the download progress on the bar in the dialog. I added my aia and its blocks graphic.


download.aia (67.6 KB)

This will happen for the ShowProgressDialog of the Notifier as well. This is because you need a delay to show the linear progress dialog (for whatever reason). 50 ms should be OK.

Tested, and working.

download_1.aia (67.9 KB)

Blocks:

P.S. Linear progress bars only work with themes other than Classic. Changed it as well.

Ahhhhh... I did not know they do not work in Classic themes... many thanks. Just in case, do you know if does exist an extension of Web component able to signal the progress of a file download? The origina has just an event to say that download is done.

I'm not sure, but I think the Custom WebView extension might do this. (Hide the WebView and go to the download URL.)

Do you know also why just in one case my DaffyDialong background is white and text black and every others are black with text white? The white is a CustomChooseDialog, the others are CustomMessageDialog(s) and ShowLinearProgressDialog. I left everything as is, all defaults.

I think this has to do with themes. What happens if you check LightTheme in the Properties?

Hi Gordon, is it possible to set the position of the dialog on the screen (so that it does not always appear in the very center of the screen)?

1 Like

Hi, currently, you can set it to center or fullscreen. As for other positions, I can look into it and if they're possible, push a new update later. Thanks.

1 Like

What should I do if I want to use images from the web? What should I input for the image path?

I would try the link to the image, for example

https://community-appinventor-mit-edu.ezproxy.canberra.edu.au/uploads/default/original/1X/69d98bd983c7c56415dd3f05dea67a20ac6d355c.png

Taifun

Yea I tried, doesn't quite work tho.

In this case it looks like the extension is not able to display images from the web... just download it to your device before displaying it then

Taifun

1 Like

Thank you for your feedback. Here is :star2: version 7 of the extension, with a ton of new features.


Blocks changes:

  • New GravityVertical property that specifies the vertical position of the dialog. (@Alexandre_Gorine)

    image

  • An id parameter has been added to the custom dialog blocks. From now on, you can create multiple custom dialogs with one DaffyDialog extension!
    blocks

  • The Font property blocks are removed, and are now replaced with helper blocks that function the same.
    image

  • New InputType helper blocks that specify the input type of the input dialog.

    image

  • All useIcon parameters are removed. The extension will automatically detect whether the path is valid or not.

  • All iconPath parameters are renamed to icon, since the parameter accepts content URIs and URLs now.

  • Some parameters of functions are renamed or rearranged for clarity.


Designer changes:

  • New icon for the extension!
  • In response to the nb194 update, I have now added property categories to all properties of the extension.
  • The default value for the LightTheme property in the Designer is now true. This change will not impact existing extensions in projects.
    image

Behavior changes:

  • All icon and image parameters now accept full paths (file://storage/emulated/0/ ...), asset paths (//icon.png), content URIs (content://com. ...), and even URLs directed to images (https:// ...)! Now, you can supply FilePicker selections directly to the extension without converting the URI. (@Chris_Wong)

Internal changes:

  • A lot of unnecessary code in this extension are removed, and everything is sorted out neatly.
  • This extension was recompiled with Extension Template in an effort to migrate all of my old extensions from Niotron IDE to Extension Template or Rush.

Update progress

:negative_squared_cross_mark: Documentation
:white_check_mark: Extension file
:white_check_mark: GitHub repository
:negative_squared_cross_mark: Sample project

4 Likes

Hello
Can anybody help me ...I am trying to make this simple example ..but it's only
working when No is the answer
Daffy

1 Like