Help test nb191

I finally thought of a use case for the EVERY component block.
Setting themes, like dark mode, where you want to flip colors regardless of context or function. Or maybe language fonts, if you've got the .ttf and license.

1 Like

for "custom font typeface support", I tried materialIcon, it's working fine on label and button.
For FontAwesome icon, I can set the htmlFormat of label to true and set it's text as "&#x" + its unicode.
but how to set button use fontAwesome?

And I got an error when try to connect companion (running in LDPlayer android emulator, Android 7.1.2 ):
Snipaste_2023-02-10_11-49-32

Emulator - Pixel 4XL, Android 12:


when i do this

i get this:
image

i think both of these statements should be true.

the same behavior is at play here:

image
the above returns true

but when i do this:

i get this error
image

@ewpatton

1 Like

Sorry, I temporarily made this thread private on my phone shooting for the like button but hit the wrench instead.

I think I fixed it.

Talk about the throwing a wrench into the works :confounded:

3 Likes

I've filed a bug here and am working on a fix:

1 Like

When you connect to the emulator, which connection mode do you use: companion, emulator, or USB?

companion

is there a corresponding aiStarter that goes with nb191? my code below works in companion but fails in the emulator - at the set flist block...
image

Your emulator needs to have the test Companion.apk file dragged into it.
Get the test Companion.apk file from the ai2-test Help->Companion Info pulldown.

1 Like

worked like a charm! thank you!

  • Fix Spreadsheet.GotRows returning 0-indexed values instead of 1-indexed values (@dhruvpatidar359)

Confirmed that it works okay now.

Noticed the red error from the parameter name change, was able to clear it by going into the variable name pulldown and choosing the new name(s).

Android 9 - MIT Companion 2.66u, I get this error...

If I manually copy the .ttf file to /storage/emulated/0/AppInventor/assets, it does work.

1 Like

Does it work in other Android versions Juan? Or as an APK?

I have successfully used a TTF font in Android 6, 10 and 12. However, Android 6 only tested as an APK.

Android 5 -MIT Companion 2.66u - ERROR

b_p56G_lectura_rapida_copy.aia (198.4 KB)
Installed it works, but with MIT Companion 2.66u it gets this error:
Error from Companion: Font asset not found /storage/emulated/0/AppInventor/assets/comic.ttf

Yes, it doesn't work on Android < 10 with Companion. There is the wrong path to the assets.
It should be:

/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/AppInventor/assets/comic.ttf

@ewpatton

I have filed an issue to track this bug.