android :: Service :: defaultinit
android :: Service :: on_start_command
The service received a start command (may happen more then once per service)core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
android :: Service :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
android :: Service :: on_start_command
The service received a start command (may happen more then once per service)core :: Object :: output_class_name
Display class name on stdout (debug only).
# Android service with its life-cycle callbacks
class Service
# Java service with the Android context of this service
var native: NativeService
# The service has been created
fun on_create do app.service = self
# The service received a start command (may happen more then once per service)
#
# Should return either `start_sticky`, `start_not_sticky` or `start_redeliver_intent`.
fun on_start_command(intent: JavaObject, flags, id: Int): Int do return start_sticky
# The service is being destroyed
fun on_destroy do app.service = null
end
lib/android/service/service.nit:110,1--125,3