Gigantic deception with "Hybrid App" what are the options?

Hi,

Context
We are developing a web platform for data management in an industrial context with Xojo Web. Besides some limitations we’ve been facing, we are satisfied with the result.

It might not be the best place to discuss the problem I’m about to share here but, since I’ve always received constructive comments and inputs from the Xojo community, I thought I’d give it a try.

We needed a mobile app to go along with our web platform. We made a first prototype with Xojo. It could have been sufficient for the purpose of the application we wanted but the impossibility to make its Android counterpart out of the same code brought us in another direction.

For economical reasons, we considered hybrid application to be the best approach. It would make possible to use the “same code” for both mobile platforms we needed to develop for. Now, after a year and a half of development, we think we are in a dead end. We need our app to operate both online and offline. One of the main functionality is to use pictures taken by the user. When offline, the pictures have to be stored on the device until the user syncs the app with the database.

The Ionic framework we are using allows some workarounds (Cordova plugins) but we are facing serious issues related to the limited amount of data that can be stored on the device.

Questions
1- Are we right to think that in our context, hybrid apps will not fulfill our need? Is there any way around we don’t see?
2- If we are right, is the only solution developing native application for both platform?
3- If so, is there anything from what we developed can be of any use?

Thanks in advance for your advices.

1… Hybrid apps always require compromise between the platforms (just ask Xojo). The question is, are those compromises something that the app can deal with today, and more importantly in the future? The positive is usually a single source library
2… Native apps usually result in a better user experience as they can be adapted to conform to the platform and to the expectations of the users of that platform. The downside is you must maintain a source library for each supported platform
3… The “concept” behind any GUI elements can be applied to most any platform, and of course all the business logic, especially if it were designed as GUI agnostic to begin with

Thanks, Dave.

The compromise would have been acceptable in terms of usability if the memory and data availability had not been so limited…

If you were having memory and/or data issues I doubt those were related to it being “hybrid” unless the app is gigantic (in which case a rethink of design might be in order)

[quote=417402:@Roger St-Arneault]Hi,

ContextThe Ionic framework we are using allows some workarounds (Cordova plugins) but we are facing serious issues related to the limited amount of data that can be stored on the device.[/quote]
How much data are you trying to store?

We have been facing lots of crashes when “too many” pictures were saved on the device. As far as I know, the picture gallery can’t be used, neither the available dick space on the device.

I might be wrong but to be able to use disk space, all data has to be stored into the database file that is within the app folder. This involves converting pictures into base64, store then in the SQLite Database and retrieve it to send it after. We put put data into a JSON string and send it to the API where the data is synced and the pictures converted back into pictures.

We actually face a limit of around 30 pictures (1024x768). We had to reduce the picture resolution because the app was crashing after adding only a couple of pictures.

Hi Gavin, we would like to be able to store around 70 pictures. For the rest, the is a couple of JSON strings that are not so big. So, 70 pictures might be 100 Mo more or less…

I’ve only briefly played with the Ionic framework so I can’t comment on that but there’s nothing stopping you, in Xojo or Swift, from saving as many pictures as you like, up to the capacity of the device, either stored in a database or simply saved as Image files, within the application’s own container.

Of course, this doesn’t yet give you an Android app, but Xojo does build native iOS apps.

70 pictures? that is nothing for starters…
2nd … you should not be “required” to store them as Base64. you could store them as Blobs, or (my opinion) store them as actual pictures, and let the database store a simple link instead. you should be able to store 1000’s of pictures

OK, good to hear that…

Actually, I’m not the one developing the app. I take care of the web app and the API. The mobile app is being developed by external resources. They seem to be unable to solve that issue.

Hmm… That makes things more complicated…

Anyone feel like they could solve that?

Sure… change who your outside resources are :slight_smile: I’d question their ability if they have been working on this issue for a while, yet multiple alternatives have been suggested here in less than an hour :slight_smile:

Hire a better developer?

Edit: beaten by Dave

:slight_smile:

That is what I’m thinking about…

If anyone has interest, communicate with me in private!

@Roger St-Arneault, below are some tools that compile for native code, from a single source code:

Perhaps the most solid is NativeScript … Not the simplest … but the most reliable in terms of business.

Thank you Adelar,

Nativescript looks promising, I’ll take a closer look to it.

Thanks for the tip!

To start, I’ve only ever developed native on mobile for work I’ve done. (ObjC and Java and now Swift is in progress on another project for iOS/tvOS requirement. )

While I’ve played with cross platform on mobile, at the time when I had projects, the native approach seemed to always be the right one given the speed of change on the platform or specific use cases I had. (Most of my use cases were emergency communications centric) Something seems wrong with the limit you’re hitting, I would suggest a separate pair of eyes on that for a quick consult. It may be cheaper to just resolve this one issue if the rest of the application is solid. Preferably someone who’s spent time in the Hybrid space. It’s probably something silly and easily fixed with the right developer engaged.

With respect to online/offline, I’m actually just getting ready to dig into this and looking at using AWS AppSync (hosted GraphQL) which does apparently also support working with Ionic, though, as I’ve said, I’ve not touched that with any paid gigs. I do plan to look at it again when/if my crazy schedule settles down.