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

Ok, I corrected 2 bloks (attached) but I did not see any icon on my dialog:


.

Ok, found now it works.

Always helps to run a simple test first :wink:

image

it was my test what I send and apparently looks similar, the main problem I did not understand since the beginning that the asset absolute path did not work and can not be used also if I do not understand why.

:question:

The problem is the icon itself at least in the apk, first image is from companion and second from apk


as you may see it is not visible or just few visible in the apk

Absolute and full path to the ASD works for me (Android 13).

:question:

1 Like

I can retry but the block I posted using assets path did not work for me. And... I agree it is not good to have to copy from assets path to ASD...

I confirm that here does not work if I put the absolute path of the assets folder, only if I put the absolute path of the ASD so I need to copy the icons files from assets to ASD. Ok, it is not a big problem because they are 4 little files but... yes it is stupid, could be a lot better if the extension could accept both absolute paths.

Which "absolute path of the assets folder"?
There is no absolute path of the assets folder at least not with the compiled app (APK/AAB).

I mean using FileScope "Asset" as scope input for File1.MakeFullPath. For me it does not work for apk and also using companion.

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