The application leaves the active state but is still partially visible

It may then go back to on_resume or on_stop.

Triggers are platform specific:

  • Android: Activity.onPause
  • iOS: UIApplicationDelegate applicationWillResignActive

Property definitions

app $ AppComponent :: on_pause
	# The application leaves the active state but is still partially visible
	#
	# It may then go back to `on_resume` or `on_stop`.
	#
	# Triggers are platform specific:
	# * Android: `Activity.onPause`
	# * iOS: `UIApplicationDelegate applicationWillResignActive`
	fun on_pause do end
lib/app/app_base.nit:67,2--74,20

app :: ui $ App :: on_pause
	redef fun on_pause do window.on_pause
lib/app/ui.nit:81,2--38

android :: audio $ App :: on_pause
	redef fun on_pause do
		super
		for s in sounds do
			# Pausing sounds that are not already paused by user
			# `s.paused` is set to false because `pause` set it to true
			# and we want to know which sound has been paused by the user
			# and which one has been paused by the app
			if not s.paused then
				s.pause
				s.paused = false
			end
		end
		audio_manager(native_activity).abandon_audio_focus
	end
lib/android/audio.nit:703,2--716,4

app $ CompositeControl :: on_pause
	redef fun on_pause do for i in items do i.on_pause
lib/app/ui.nit:193,2--51