Offline Use - Loading Images - XY Background

Alrighty, a bit of knowledge seeking around this.

First, if I enable “The app can start when offline” the loading images indication in the menu goes away. I’m kind of confused on how that option and the “Store content for offline use” interact together, and what the intent is. Why can’t I start while offline, and still load the images when there is connectivity? I guess I’m just a little confused as to what is actually going on in the background.

Second, when I was set to see the loading images it needed to load 1116 images. I went into my data set and literally counted how many images with relative data paths my application had access to, and it was ~70 images. What is that about?

Third, Dynamic XY Background images don’t seem to load and function correctly when offline even when I wait for all 1116 images to load. I have a setup where we have a color background image and a grayscale version of that same image. We allow the user to toggle back and forth so that the Pin are well highlighted over grayscale, but they can switch to color when they need to zoom in and review the details of the drawing. This expression results in relative image path which is available in a basic image column on the parent to the pins. When we’re online and not thinking about this, everything works fine. When we load the app/images, and then switch to offline, nothing about the XY background functions well… What should I be expecting?

2 38 1,641
38 REPLIES 38

Steve
Platinum 4
Platinum 4

I seem to recall a developer posting that there are resized versions of each image.

Hmmm well, 15 different versions of the same image and still not being able to stick it on the background, or automatically give me a grayscale option seems a bit excessive

Maybe AppSheet is using the Image Pyramid for XY Background Images?


That would explain the amount of images in your App.

Is for sure disconcerting to users. But I’m more interested in the offline functionality, and it seems sketchy with XY
Have you done much experimentation with offline?

I found some information in this article:

One important pre-condition for all offline access is that the app must initially be launched on the device when it is online.


Note that offline content viewing of images and documents only works when the links to the images or documents use relative paths as described in Working with PDF Files.


Launching offline : If you have used the lightweight deployment mechanism, you are familiar with launching apps from their home screen icons. By default, a mobile device needs to be online in order to launch an app from its home screen icon. Once launched, the app can then function offline or with intermittent connectivity.

However, if you wish to launch the app when the device is offline, you must go to the Behavior>Offline & Sync tab and set the ‘Offline App Launch’ option. You must do this before installing the app on your device . If your app has already been installed to the home screen, the shortcut must be deleted and installed again after enabling the offline option. Otherwise you will need to launch it from the AppSheet app itself.

@Adam can you help me out with some knowledge around this?

You are so right @Grant_Stead
I hadn’t tested my App offline, but it’s true: Images are showing up; XY Background Images do not.
In fact: XY does not work at all while offline.
Maybe this related to the “Maps and Offline Usage” in the above help article?
“However, you won’t be able to display the position in the map view while the app is offline.”

I’m guessing that even though we can simply use relative paths for images as background, that deep down appsheet is still converting it into some sort of public image.

I mean I know it’s possible to do… When I travel sometimes I’ll download an entire map so that I have it for offline use… I honestly just figured this would all work the same…

Yes that’s right, but not possible in AppSheet.
In the Help Article it says:

Maps and Offline Usage

It’s possible to capture the user’s current location with a LatLong input because this can use the device’s GPS. However, you won’t be able to display the position in the map view while the app is offline. We’re unable to cache Google map data for offline use because it would violate Google’s terms of service. Google’s own Maps app does offer downloading of map regions for offline use, but unfortunately they don’t make this feature available for third party apps that use maps.

Well they’re not third party any more…

Hi @Grant_Stead so what’s the summary? You can’t use a XY App while offline?

Another thing: Every time I start the app, it will show the “Loading Images” and will load again all images. Do you see the same behavior?

Currently, XY offline is a little strange. Theoretically it should work, but in practice it does not.

The map must preload into cache all the images that it would need for offline use while you’re connected…

So, if you’re offline, and add an image through the app, and deref that into the XY background… It won’t ever show up as a background. It won’t exist in the map cache… Further, if you have any expressions that choose one background over another dynamically, only the images that are “used” will be pushed to cache, making the others not available offline.

So, the main trick is making sure you preload any images that will be used into the map… Think a virtual xy column or something… (This won’t correct adding an image while offline to be used in XY)

One other issue is that only 10 images were/are cached…

KML also isn’t cached. So, it’s just gone while offline.

Also, the behavior around zoom levels and caching each of those is hard for me to fully explain, or even understand. But right now, when I’m offline, I can’t really zoom in, the map blanks on me…

Yes, the same loading behavior exists for me as well… It’s very fast though, and I think it’s doing a check or download type thing…

I’m working with @Adam to solution this a little better. I’m very hopeful that we can find a middle ground solution.

Thank you very much for the input.

If we could use dynamic expressions for the KML layer, we could use relative paths and then it should be available offline?
I started using KML for info Text screen overlay. To tell the user what to do on the xy map view.

No, AppSheet would need to specifically build the KML Caching into the Map Java… Currently it’s not.

So, is there any chance to get XY backgrounds fully working when it’s offline?

So far, in my opinion, not yet…
I feel like Adam is close, but my testing of the fixes haven’t produced results…

Hi do you still face the problem loading images everytime the app starts? If not, could you please advise how you solve this?

Saw this on changelog:
An issue was fixed where zooming in too far would cause XY maps to go blank when offline.

Caveats: For XY maps to work offline, the app must enable offline caching and must be started online before going offline. Currently only supported on Android.

Rollout: 100% free users and 33% paid users.

So, this is the solution? Need online at startup app or one map?

Basically…
Unless I’m mistaken the map is java, and the images must be loaded into cache…

@Grant_Stead @Adam - changelog was from January. Is something happened since that time? My worker says that XY map is still going blank when offline where zooming.
Is there something on roadmap about working without Internet Connection?

Another question: is option for storing images offline is even related to XY backgrounds? Maybe no and users should always start online with loading map normally and then turn to offline?

@Grant_Stead Could you answer? Is option for storing images offline is even related to XY backgrounds? If not, I would like to turn off this option because I have hundreds of images different from XY backgrounds.

In my opinion, it should be. In my experience the images do not get cached correctly for offline use in XY background. While I am an Appsheet partner/reseller, I can’t speak for what Appsheet does or intends.

I have been working with Appsheet behind the scenes for over a year now to help resolve this.

Okay, thanks for your reply. I’m going to test this on my own, but it would be good to hear from AppSheet’s team what’s going on.

Hi @Grant_Stead I have an app with XY background images.
This app is used only on desktop.
This is my setting:
3X_1_8_18b61c24cb61b28a1ff927e645b365a9a7639027.png
On my phone it’s loading the images.
Do you know if “Store content for offline use” is not working for desktop?

Hi @Grant_Stead can you confirm?

Yeah, the browser is expecting connection.

What’s up with this function? It looks to me that at every start it has to download (X * Y images uploaded by me). It slows down the app.

Can we configure priority of the images that must be saved for offline use (like XY backgrounds)?

No, we don’t have any control over the priority of the image loading.
I’m not sure if @Adam has any insights into whether or not XY Images are prioritized.

@Wojciech_Szczepanik once the images have downloaded, and you flip into airplane mode, do the XY backgrounds load for you, are they zoomable?

In form view the XY map does not event appear.
In other view they are zoomable.

Has someone experimented using a BackgroundsTable and instead of using a URL for the Background of the XY, refer to an Image column inside the BackgroundsTable?.
The app should store the Image since it’s on a normal table, not just the XY config.
If there is just one row inside the table, the expression on XY config would be:

INDEX(
  BackgroundsTable[Image],
  1 /*First item on the list*/
)

I don’t use XY columns but this makes sense to me

Yes, we don’t use a URL. We’re using images from within the app typically on referenced tables…

This is really a problem indeed. I tried to help!

I got an email:
“To use images offline, you’ll need to enable Sync content for offline use (see below), then sync the app at least once before using offline. Note that the sync may take a long time if there are many images to sync. If I recall correctly, the app will indicate the sync status in the app’s main menu.

There is no way to choose which images are and are not stored on the device for offline use. If the app uses a large number of images, you may indeed notice performance problems and encounter storage limits.”

I am wondering how can I block/delete some of the old images. Any ideas?

First, that’s not correct…

Syncing is separate from loading images. Yes, the images can take awhile to load of there’s a ton of them.

Ideally, you would break your app contents down to the minimum required info with security filters. For example by project, work ticket, etc…

I’ve had the store content for offline use toggled on for over a year now in a pretty heavy app, with new users being added weekly. No issues…

Let's try once again with this thread.

 

 


@Grant_Stead wrote:

First, that’s not correct…

Syncing is separate from loading images. Yes, the images can take awhile to load of there’s a ton of them.

Ideally, you would break your app contents down to the minimum required info with security filters. For example by project, work ticket, etc…

I’ve had the store content for offline use toggled on for over a year now in a pretty heavy app, with new users being added weekly. No issues…


How come? I have an app with 6 images per row.

You have it enabled because of the XY backgrounds?

I need only the XY maps working when offline.

Hey. 

Any update on this ? Did anyone found a solution/counter to see background images offline ?

 

 

Top Labels in this Space