When I install a Canvas app on my phone, the marker image doesn't appear, unlike in Companion

I'm adding an image to the marker.

When I run it in Companion, the image appears and I can rotate it.

When I install it on my phone, the image doesn't appear, and the rotation doesn't work either.

What could be the problem?
I'm using a Xiaomi Redmi 14C with Android 14.

rotateMapMarker (1).aia (110.6 KB)

Hard to guess without an aia export.

Differences between Companion and built apps:

  • Empty TinyDB, returning untried defaults
  • File system differences
  • Permissions

I attached it there; I have to upload it in parts because the page keeps crashing.

greetings

I would reexamine your Canvas file image path.

If there is no Companion, the path must be different.

Maybe the Canvas Save block gives you a path?

By the way a 1 millisecond timer is unrealistic.
Settle for maybe 30 ms.


which one would it be?

But why is the image reflected in the Compamion?

When you do a Canvas SaveAs in the Companion app, it lands in the Companion's storage directory.
That's the directory you look in to set your image for the marker.

When you do a Canvas SaveAs in a built app, it lands in that built app's storage directory, which is different from the Companion app's storage directory.

There is a way to know t run time if you are running in the Companion.
You need an if/then test and a different path for your marker image update.

You must not hard-code the ASD path.


thank you


A question:

Is it possible to place text below the image without it rotating, just like the image?

Have you tried adding Description Text to the marker and then telling the marker to display it?

You are saving twice
Remove the first duplicate blocks

Taifun

1 Like

I haven't tried it yet. How can I implement it in the block?

Would it be something like this?

image


(from another app tracking trucks)