Page 1 of 1

LC 6.7.*: SA survives background, open stack doesn't

Posted: Sun Nov 01, 2020 4:59 pm
by AxWald
Hi,

strange behavior:
When using LC 6.7.10, a StandAlone on Android will happily survive being sent to background, or to sleep.
(Assuming the "allow background" setting of the gadget is active)
But when this SA opens another stack, and this one is shown, each "going to background" will kill the whole app (sleep still works fine).

I'm quite sure this wasn't always. First I thought it came with Android 5/6, but now I can see it even back to Android 4.
Anybody ever experienced this, or has an idea what can cause this?

Yes, I know, this is not a problem in 9.6.1. But that is not the question.

Have fun!

Re: LC 6.7.*: SA survives background, open stack doesn't

Posted: Mon Nov 02, 2020 9:17 pm
by jacque
Yes, I've always seen that. I have a personal tool that opens another stack for testing and when I close the second stack, the whole set quits. It's always been that way. I haven't recompiled it in LC 9.6.1 yet, I didn't realize that version fixes the problem.

Re: LC 6.7.*: SA survives background, open stack doesn't

Posted: Thu Nov 05, 2020 4:46 pm
by AxWald
Thx, Jacqueline.
Seems not many are among us coding for the most used OS at all :/

Anyways, guess I've found the culprit. In my case it is:
  1. The Android StandAlone has been compiled with LC 6.7.10.
    LC 9.6.1 doesn't have this behavior, dunno when it changed between these.
  2. You use the classic "go stack X in new window" mode to open another stack (from the SA);
  3. AcceleratedRendering is ON;
  4. You switch to another app, and come back using the "active apps" feature.
  5. BOOM!
I was able to find a workaround - using "go stack X in the window of this stack" & then adding bunches of dirty tricks to have it display properly. But it seems to run stable now.

Appended is a demo stack. To test yourself:
  1. Open .zip, extract the contained folder, open it.
  2. Open "awa_StackSwitch.rev" in the LC version of your choice.
  3. Plug in your android gadget, and send the app over using "Test".
  4. On the gadget, acknowledge the window switching status dialog.
  5. Without any changes, hit "Go Stack!". Another stack opens ("buttontest.rev").
  6. Activate acceleratedRendering with btn "Activate 'accRend'!".
  7. Switch to another app on your gadget, come back.
  8. If your LC version is vulnerable: Enjoy the silence.
The code is commented, and there's some explaining text. There's even a debug mode, in case you want to know what happens on the gadget.

If you're using 9.6.1 (the so-called "stable") this also show shows a clear bug, and a change for the worse compared to 6.7.10:

Bug: On the second card there's 2 rows of buttons - left side with autoHilite, right side with manual hiliting. In 9.6.1, autoHilite is clearly broken. In a so called "stable version". On the most used OS at all. Is there a quality control with the mothership? Reported.

Change for the worse:
My Tablet looks like this in the most used form (~20° slope). In LC 6 the engine reliably realizes this means "landscape" (as does any other app on the tablet). But LC 9.6.1 cannot decide - most of the time it thinks "portrait" (initial setting) looks good, but sometimes it decides for "landscape", too ... I have to go to nearly 30° until it's sure that we're "landscape". Reported.

Anyways, I found a way to keep going with 6.7.10. I really hope there'll be ARMv7 gadgets available for still some time ...

Have fun!

Re: LC 6.7.*: SA survives background, open stack doesn't

Posted: Thu Nov 05, 2020 8:32 pm
by jacque
My own test app just uses "go stack". I didn't think to go in the same window, I will try that the next time I recompile.

BTW, Android is the most-used OS outside of America but here it's iOS by a large margin. I've found Android to be much more capable, but iOS users seem to like the limited feature set because they say it's easy to use. I get frustrated because I find it too simple to do anything useful, but I did see that iOS has copied almost a dozen features from Android in their latest release.

Re: LC 6.7.*: SA survives background, open stack doesn't

Posted: Fri Nov 06, 2020 3:59 pm
by AxWald
Hi,
jacque wrote:
Thu Nov 05, 2020 8:32 pm
My own test app just uses "go stack".
Just did a quick test with the demo:
"Go stack X" behaves exactly like "go stack X in new window" - both result in 2 stacks in "the openStacks", and when you activate "acceleratedRendering", then switch out & back in, crash.
Interesting, these seem to be synonyms, at least in 6.7.10: Both open a new window.

jacque wrote:
Thu Nov 05, 2020 8:32 pm
BTW, Android is the most-used OS outside of America but here it's iOS by a large margin.
Well, now this is a hot topic. This now is not aimed at you, Jaqueline, but it's sitting on my SSD for a time, and it suits just fine here:

Even if I see only 50/50 in the USA and about 70/30 % distribution between Android & iOS (statcounter, statista ...), in my humble opinion iOS should be close to irrelevant for LiveCode/RunRev. Now stoneth me! ;-)

Why?
Well, the USP of LC is (IMHO) the possibility of rapid development, for the creation of software with limited complexity *1), but spanning a multitude of OSses.
Prime target customers for RunRev thus would be developers like freeLancers or small companies that create highly customized commercial software for a healthy income, to be able to pay the, hmmm, beefy annual fees *2) RR calls for.

But the software created by those you'll rarely find in an AppStore. And you'll rarely find any honest *3) app in an AppStore that a.) can be made with LC and b.) generates enough annual income to even pay for an Indy fee. Such beasts may exist, for sure. I'd love to hear about some.

Thus, RR is shooting its own foot when relying heavily on iOS, IMHO. It'll be not many developers that can generate even the annual fee for RR, not to mention the amount needed to make a comfortable living, with only AppStore apps. I'd love to hear about such products, too!

Thus, it's not in RR's interest to spent more effort on iOS than necessary, while neglecting platforms that promise a by far better monetization.

Have fun!


*1) - means below the complexity of OfficeSuites, Browsers, AAA-Games, fullScale ERPs etc.
*2) - to get full tsNet & remote debugging it's $1.999/YEAR, and that's quite a number ...
*3) - I assume we all view the multitude of "ad distributors", "contact thieves", "hidden click generators" etc. in the AppStores as malicious & below our level, right?

Re: LC 6.7.*: SA survives background, open stack doesn't

Posted: Fri Nov 06, 2020 6:10 pm
by FourthWorld
How many Python-based apps are in either app store?

How would one identify them?

Re: LC 6.7.*: SA survives background, open stack doesn't

Posted: Fri Nov 06, 2020 11:01 pm
by jacque
Even if I see only 50/50 in the USA and about 70/30 % distribution between Android & iOS (statcounter, statista ...), in my humble opinion iOS should be close to irrelevant for LiveCode/RunRev.
:)

I've been doing mobile apps almost exclusively for the last few years, it's what my clients want. And without exception they want iOS and Android both. All the major mobile apps I use also support both platforms. I did have one client with a niche product who didn't want Android at all, only iOS, because that's what all her customers used.

So the best thing for LC to do is to support both mobile platforms equally. Fortunately, Android is finally catching up with iOS in feature support, partly due to the LCFM initiative. I'm happy about that.