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,654
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