Skip to main content
Bumped by Community user
edited title
Link
Vaillancourt
  • 16.4k
  • 17
  • 55
  • 61

How do I know when the app is launched, loosesloses focus and gets focus again on mobile?

fixed the title and the tags.
Link
Vaillancourt
  • 16.4k
  • 17
  • 55
  • 61

OnApplicationPause()/OnApplicationFocus() in Android/IOs How do I know when the app is launched, looses focus and gets focus again on mobile?

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 64 characters in body
Source Link

I searched in Unity Documentation but there are no information. I'd like to know which methods is called and what it returns in the following scenarios on Android:

  • App initially starts
  • App goes in the background
  • App is brought forward after being in the background

As for IOs I know that the scenarios should be the following:

  • App initially starts:

    OnApplicationFocus(true) is called

  • App goes in the background:

    OnApplicationFocus(false) is called

    OnApplicationPause(true) is called

  • App is brought forward after being in the background:

    OnApplicationPause(false) is called

    OnApplicationFocus(true) is called

I'd like to know which methods is called and what it returns in the following scenarios on Android:

  • App initially starts
  • App goes in the background
  • App is brought forward after being in the background

As for IOs I know that the scenarios should be the following:

  • App initially starts:

    OnApplicationFocus(true) is called

  • App goes in the background:

    OnApplicationFocus(false) is called

    OnApplicationPause(true) is called

  • App is brought forward after being in the background:

    OnApplicationPause(false) is called

    OnApplicationFocus(true) is called

I searched in Unity Documentation but there are no information. I'd like to know which methods is called and what it returns in the following scenarios on Android:

  • App initially starts
  • App goes in the background
  • App is brought forward after being in the background

As for IOs I know that the scenarios should be the following:

  • App initially starts:

    OnApplicationFocus(true) is called

  • App goes in the background:

    OnApplicationFocus(false) is called

    OnApplicationPause(true) is called

  • App is brought forward after being in the background:

    OnApplicationPause(false) is called

    OnApplicationFocus(true) is called

Source Link
Loading