Taifun Tools - Activity Changed

I tried this way. But I was unable to delete the tag of the CloudDB.
Can anyone see that there is any problem with my code?

The equal block is a Math operation in your block. You should use logical equal operation (the green one)

1 Like

I tried that way but it didn’t worked.

I found the Taifun Image in which he used the Math Block. Let me show you.

That’s app inventor…

Ok, I will try in the way said and let you know the result.

Thank you very much, Its working now.

1 Like

For me also the Math block works.

So check this:
grafik

Btw, no need for an extension:

grafik

1 Like

That’s weird, I thought Math operations can only work with numbers.

from the documentation Logic - Kodular Docs

It acts exactly the same as the = block found in Math

Taifun

3 Likes

Pause and Stop works in the same way for me.

see here about the difference between pause and stop
https://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
Taifun

1 Like

Yes, because after ScreenOnAppPaused is triggered, Screen.OnAppStopped is also always triggered.

https://docs.kodular.io/components/screen/#on-app-stop

As I have shown in my last post (video), these statements are not correct:

(though it does not always mean the activity is being destroyed)
Yes, but at the end there is no way to come back from Screen.OnPause to Screen.OnResume.

So if Screen.OnPause is triggered, in any case Screen.OnStop is triggered as well.

1 Like

did you test what happens, if the device goes into sleep?
Taifun

Of course, the same:

taken from here 2.2: Activity lifecycle and state · GitBook

The paused state can occur in several situations:

  • The Activity is going into the background, but has not yet been fully stopped. This is the first indication that the user is leaving your Activity .
  • The Activity is only partially visible on the screen, because a dialog or other transparent Activity is overlaid on top of it.
  • In multi-window or split screen mode (API 24), the Activity is displayed on the screen, but some other Activity has the user focus.

Your Activity can move from the paused state into the resumed state (if the user returns to the Activity ) or to the stopped state (if the user leaves the Activity altogether).

Taifun

I had read that and went through all sorts of scenarios and variations.

A nice theory, but it doesn’t change the fact that OnAppPause always also triggers OnAppStop.

did you test the situations below?
Taifun

  • The Activity is only partially visible on the screen, because a dialog or other transparent Activity is overlaid on top of it.
  • In multi-window or split screen mode (API 24), the Activity is displayed on the screen, but some other Activity has the user focus.

@Taifun Yes, if you mean something like this:

this looks like the list of recent opened apps?

The Activity is only partially visible on the screen, because a dialog or other transparent Activity is overlaid on top of it.

Probably the alarm app is an example? What happens, if an alarm rings while your app is open? In case this is not a suitable example, probably someone else has an idea how to test this?

In multi-window or split screen mode (API 24), the Activity is displayed on the screen, but some other Activity has the user focus.

see here about split screens https://www.google.com/search?q=android+split+screen, for example

Taifun