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

You had this issue previously, with dark mode on your device:

#####################################

As far as I am aware, you cannot make a filepath to a file in assets with a compiled app using the File component. This has to be done in java in an extension. We have shown you the alternative, use it.

You could make a procedure to generate a placeholder file for the asset you want (which is overwritten by a call to a different file) which makes the blocks somewhat simpler:

1 Like
  1. No, it is not related to dark mode, I simply copied the icons from the material ui library nad I choose the 2 tones version without realize the 2nd tone is done using the alfa channel. Anyway I had to change them with a more coloured version so I found the problem.
  2. Yes I am using that solution, I just replied to Anke.

It would help to keep these replies on the community, to save others time and effort, on your behalf....

OK, may I repost it?

Sorry, I don't understand what exactly it's about. Post the aia or better yet a simple test aia.

file:///android_asset/ (path with APK) is only relevant for the webviewer.

Correct, I don't think file:///android_asset/ works with any Android classes (at least not Typeface or BitmapFactory). For the APK, you'll have to copy the image to somewhere else (such as the ASD).

I did this example to better expalin what I mean in general with the problems of the paths differences between apk and companion and what I see running the example.
On the top of the screen there is an image I use to load the same image I used on the dialogs. As you may see in the blocks, Image has a combo where I can select one file between the files in the Media list, no need to specify the absolute path but "magically" it works without doing nothing both using companion and apk.

Under the image there is a scrolling label used to display test messages. First of all you can see a message if the icon image was copied from the asset to the ASD path, then in the 2 and 3rd rows I display the asset and the ASD path, in 4th and 5th the directory list of the assets and ASD files.

What I would underline is that also in the apk the assets path does not exists the 1st time I execute the app after a fesh installation it reports that the icon file was copied from the asset path to the ASD path and it also lists the 2 directories. Considering their contents are different this should mean that the assets file does exist somewhere in the filesystem. This means also that the files in Media are downloaded somewhere but not in ASD also in the case of apk.

About what works and not for me:

  • using apk only DIALOG 3 displays the icon
  • using companion DIALOG 2 and DIALOG 3 display the icon.

What I would like: honestly I would like that every standard component work as Image passing just the file name and having the possibility to access files somewhere else specifying the full path. This would require some sort of standardization also to design extensions but could stop any problem about where are stored the
TestDaffyDialog.aia (34.4 KB)
Media files using companion and apk.

Sure, I would look into that in the future.

1 Like

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.