How do people handle licence management in a Mobile App scenario
I'm finding that in a mobile app setting, that Cache is causing the worst User Experience that I have ever seen in a mobile app - I'm just saying this hoping that someone will be able to help me out, my intent is not to criticise Intersystems.
We have a Xamarin Forms mobile app that consumes web pages that are created by Cache. The app compiles into iPhone, iPad, Android Phone, Android Tablet, UWP (Windows 10, all of phone, tablet, and desktop), as well as MacOS.
The cache-generated html that we are wrapping in the app naturally uses a licence slot when a user opens the app. What this means is that when the user navigates away from a cache page, to, for example, an FAQ page where the FAQ is generated on the app (not remotely by cache), we log them out of the cache session in the Xamarin app's page "OnDisappearing" method. Works well. So when we navigate back to the cache page, we just take another licence slot, and the user is happy. Navigate away to an on-app page and the licence dies, as we want.
Where the problem is, is in the area where the app is closed.
On iOS, there is no guarantee that "WillTerminate is called - hence we have no way of guaranteeing that we can log out of Cache using that method.
So what really sucks is that we are left with one Xamarin Forms methods that we can intercept to log out of the licences:
OnSleep()
This method is called when the app goes into the background.
So what we are doing is terminating the cache session when sleep is called (by calling a Javascript function in the page from C# (and the javascript kills the session).
That works well as Sleep is always called when the app closes.
But the problem is that if the app has just gone into the background because - for example - an incoming telephone call sends it into the background, then after the call the user would bring the app to the front and want to continue - but guess what, we have already logged them out. So we have to log them back in.
And as a user doesn't know when an incoming call will come in, he might be halfway through doing something and then because he is logged out, has to start again.
How do people cater for things like this?
It is all very well saying 'hey, design the cache stuff like this from the outset', but the problem is that the outset of this app was 20 years ago and there would be over 4000 modules to rewrite.
So what we are presently doing is logging the user out every time that the app goes into the background, and then forcing them to start again when the app comes back into the foreground.
Has anyone heard of such a shoddy user journey, which is caused for no other reason that the owner has to manage the licences in this new mobile app setting.
Any ideas?
This licence-driven-cache-architecture app design is the worst I have ever seen, of any technology.
And why am I surprised that there are no leading mobile tags, such as Mobile, iOS, Android, UWP, WPF, MacOS. Way behind the times.
Which is why I am asking for a solution.
Kind regards,
Anthony