Services allowing to launch an activity and start/stop services

Introduced properties

fun [](name: String): nullable Object

android :: Intent :: []

Retrieve an Object stored via []= function
fun []=(name: String, value: nullable Serializable): Intent

android :: Intent :: []=

Store value as a serialized Json string
fun action: nullable String

android :: Intent :: action

Returns the action to be performed or null if none
fun action=(action: String)

android :: Intent :: action=

The general action to be performed
fun add_category(category: String): Intent

android :: Intent :: add_category

Add category to the intent
fun add_extra_array_list_of_int(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_list_of_int

Adds extra data corresponding to ArrayList<Integer> java type
fun add_extra_array_list_of_string(name: String, value: Array[String]): Intent

android :: Intent :: add_extra_array_list_of_string

Adds extra data corresponding to ArrayList<String> java type
fun add_extra_array_of_bool(name: String, value: Array[Bool]): Intent

android :: Intent :: add_extra_array_of_bool

Adds extra data corresponding to boolean[] java type
fun add_extra_array_of_byte(name: String, value: Int): Intent

android :: Intent :: add_extra_array_of_byte

Adds extra data corresponding to byte[] java type
fun add_extra_array_of_char(name: String, value: Array[Char]): Intent

android :: Intent :: add_extra_array_of_char

Adds extra data corresponding to char[] java type
fun add_extra_array_of_char_sequence(name: String, value: Array[String]): Intent

android :: Intent :: add_extra_array_of_char_sequence

Adds extra data corresponding to CharSequence[] java type
fun add_extra_array_of_double(name: String, value: Array[Float]): Intent

android :: Intent :: add_extra_array_of_double

Adds extra data corresponding to double[] java type
fun add_extra_array_of_float(name: String, value: Array[Float]): Intent

android :: Intent :: add_extra_array_of_float

Adds extra data corresponding to float[] java type
fun add_extra_array_of_int(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_of_int

Adds extra data corresponding to int[] java type
fun add_extra_array_of_long(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_of_long

Adds extra data corresponding to long[] java type
fun add_extra_array_of_short(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_of_short

Adds extra data corresponding to short[] java type
fun add_extra_array_of_string(name: String, value: Array[String]): Intent

android :: Intent :: add_extra_array_of_string

Adds extra data corresponding to String[] java type
fun add_extra_bool(name: String, value: Bool): Intent

android :: Intent :: add_extra_bool

Adds extra data corresponding to boolean java type
fun add_extra_bundle(name: String, value: NativeBundle): Intent

android :: Intent :: add_extra_bundle

Adds extra data corresponding to bundle java type
fun add_extra_byte(name: String, value: Int): Intent

android :: Intent :: add_extra_byte

Adds extra data corresponding to byte java type
fun add_extra_char(name: String, value: Char): Intent

android :: Intent :: add_extra_char

Adds extra data corresponding to char java type
fun add_extra_char_sequence(name: String, value: String): Intent

android :: Intent :: add_extra_char_sequence

Adds extra data corresponding to CharSequence java type
fun add_extra_double(name: String, value: Float): Intent

android :: Intent :: add_extra_double

Adds extra data corresponding to double java type
fun add_extra_float(name: String, value: Float): Intent

android :: Intent :: add_extra_float

Adds extra data corresponding to float java type
fun add_extra_int(name: String, value: Int): Intent

android :: Intent :: add_extra_int

Adds extra data corresponding to int java type
fun add_extra_long(name: String, value: Int): Intent

android :: Intent :: add_extra_long

Adds extra data corresponding to long java type
fun add_extra_short(name: String, value: Int): Intent

android :: Intent :: add_extra_short

Adds extra data corresponding to short java type
fun add_extra_string(name: String, value: String): Intent

android :: Intent :: add_extra_string

Adds extra data corresponding to String java type
fun add_flags(flags: Int): Intent

android :: Intent :: add_flags

Add a flag to be used by the intent
fun categories: nullable HashSet[String]

android :: Intent :: categories

Returns all the intent categories or null if none
fun data: nullable String

android :: Intent :: data

Returns the data Uri the data is operating on or null if none
fun data=(data_uri: String)

android :: Intent :: data=

Sets the data uri the intent is working on
fun destroy

android :: Intent :: destroy

Deletes intent global reference
fun extra_bool(name: String, def_value: Bool): Bool

android :: Intent :: extra_bool

Retrieves the Bool extra stored with the corresponding name
fun extra_bool_array(name: String): Array[Bool]

android :: Intent :: extra_bool_array

Retrieves the Array[Bool] extra stored as Java boolean[] with the
fun extra_byte(name: String, def_value: Int): Int

android :: Intent :: extra_byte

Retrieves the Int extra stored as Java byte with the corresponding name
fun extra_byte_array(name: String): Array[Int]

android :: Intent :: extra_byte_array

Retrieves the Array[Int] extra stored as Java byte[] with the
fun extra_char(name: String, def_value: Char): Char

android :: Intent :: extra_char

Retrieves the Char extra stored as Java char with the
fun extra_char_array(name: String): Array[Char]

android :: Intent :: extra_char_array

Retrieves the Array[Char] extra stored as Java char[] with the
fun extra_char_sequence(name: String, def_value: String): String

android :: Intent :: extra_char_sequence

Retrieves the String extra stored as Java CharSequence with the
fun extra_char_sequence_array(name: String): Array[String]

android :: Intent :: extra_char_sequence_array

Retrieves the Array[String] extra stored as Java CharSequence[]
fun extra_char_sequence_array_list_extra(name: String): Array[String]

android :: Intent :: extra_char_sequence_array_list_extra

Retrieves the Array[String] extra stored as Java ArrayList<CharSequence>
fun extra_double(name: String, def_value: Float): Float

android :: Intent :: extra_double

Retrieves the Float extra stored as Java double with the corresponding
fun extra_double_array(name: String): Array[Float]

android :: Intent :: extra_double_array

Retrieves the Array[Float] extra stored as Java double[] with the
fun extra_float(name: String, def_value: Float): Float

android :: Intent :: extra_float

Retrieves the Float extra stored as Java float with the corresponding
fun extra_float_array(name: String): Array[Float]

android :: Intent :: extra_float_array

Retrieves the Array[Float] extra stored as Java float[] with the
fun extra_int(name: String, def_value: Int): Int

android :: Intent :: extra_int

Retrieves the Int extra stored as Java int with the corresponding
fun extra_int_array(name: String): Array[Int]

android :: Intent :: extra_int_array

Retrieves the Array[Int] extra stored as Java int[] with the
fun extra_long(name: String, def_value: Int): Int

android :: Intent :: extra_long

Retrieves the Int extra stored as Java long with the corresponding
fun extra_long_array(name: String): Array[Int]

android :: Intent :: extra_long_array

Retrieves the Array[Int] extra stored as Java long[] with the
fun extra_short(name: String, def_value: Int): Int

android :: Intent :: extra_short

Retrieves the Int extra stored as Java short with the corresponding
fun extra_short_array(name: String): Array[Int]

android :: Intent :: extra_short_array

Retrieves the Array[Int] extra stored as Java short[] with the
fun extra_string(name: String): String

android :: Intent :: extra_string

Retrieves the String extra stored as Java String with the corresponding
fun extra_string_array(name: String): Array[String]

android :: Intent :: extra_string_array

Retrieves the Array[String] extra stored as Java String[] with the
fun extra_string_array_list(name: String): Array[String]

android :: Intent :: extra_string_array_list

Retrieves the Array[String] extra stored as Java ArrayList<String>
fun flags: Int

android :: Intent :: flags

Returns an Int representing all the intent flags
fun has_category(category: String): Bool

android :: Intent :: has_category

Returns true if the intent contains the given category
fun has_extra(extra: String): Bool

android :: Intent :: has_extra

Returns true if the intent contains the given extra
protected fun intent: NativeIntent

android :: Intent :: intent

protected fun intent=(intent: NativeIntent)

android :: Intent :: intent=

fun mime_type=(mime_type: String)

android :: Intent :: mime_type=

Sets an explicit MIME data type to be handled by the intent, for example
fun package_name: nullable String

android :: Intent :: package_name

Returns the package name the intent resolution is limited to
fun remove_category(category: String): Intent

android :: Intent :: remove_category

Removes the given category
fun remove_extra(name: String): Intent

android :: Intent :: remove_extra

Removes the given extra
fun set_class_name(package_name: String, class_name: String): Intent

android :: Intent :: set_class_name

Specify the class to be launched by the intent
fun type_name: nullable String

android :: Intent :: type_name

Returns the set MIME and null if none

Redefined properties

redef type SELF: Intent

android $ Intent :: SELF

Type of this instance, automatically specialized in every class
redef fun to_s: String

android $ Intent :: to_s

Returns a human readable representation of the intent

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
fun [](name: String): nullable Object

android :: Intent :: []

Retrieve an Object stored via []= function
fun []=(name: String, value: nullable Serializable): Intent

android :: Intent :: []=

Store value as a serialized Json string
fun action: nullable String

android :: Intent :: action

Returns the action to be performed or null if none
fun action=(action: String)

android :: Intent :: action=

The general action to be performed
fun add_category(category: String): Intent

android :: Intent :: add_category

Add category to the intent
fun add_extra_array_list_of_int(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_list_of_int

Adds extra data corresponding to ArrayList<Integer> java type
fun add_extra_array_list_of_string(name: String, value: Array[String]): Intent

android :: Intent :: add_extra_array_list_of_string

Adds extra data corresponding to ArrayList<String> java type
fun add_extra_array_of_bool(name: String, value: Array[Bool]): Intent

android :: Intent :: add_extra_array_of_bool

Adds extra data corresponding to boolean[] java type
fun add_extra_array_of_byte(name: String, value: Int): Intent

android :: Intent :: add_extra_array_of_byte

Adds extra data corresponding to byte[] java type
fun add_extra_array_of_char(name: String, value: Array[Char]): Intent

android :: Intent :: add_extra_array_of_char

Adds extra data corresponding to char[] java type
fun add_extra_array_of_char_sequence(name: String, value: Array[String]): Intent

android :: Intent :: add_extra_array_of_char_sequence

Adds extra data corresponding to CharSequence[] java type
fun add_extra_array_of_double(name: String, value: Array[Float]): Intent

android :: Intent :: add_extra_array_of_double

Adds extra data corresponding to double[] java type
fun add_extra_array_of_float(name: String, value: Array[Float]): Intent

android :: Intent :: add_extra_array_of_float

Adds extra data corresponding to float[] java type
fun add_extra_array_of_int(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_of_int

Adds extra data corresponding to int[] java type
fun add_extra_array_of_long(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_of_long

Adds extra data corresponding to long[] java type
fun add_extra_array_of_short(name: String, value: Array[Int]): Intent

android :: Intent :: add_extra_array_of_short

Adds extra data corresponding to short[] java type
fun add_extra_array_of_string(name: String, value: Array[String]): Intent

android :: Intent :: add_extra_array_of_string

Adds extra data corresponding to String[] java type
fun add_extra_bool(name: String, value: Bool): Intent

android :: Intent :: add_extra_bool

Adds extra data corresponding to boolean java type
fun add_extra_bundle(name: String, value: NativeBundle): Intent

android :: Intent :: add_extra_bundle

Adds extra data corresponding to bundle java type
fun add_extra_byte(name: String, value: Int): Intent

android :: Intent :: add_extra_byte

Adds extra data corresponding to byte java type
fun add_extra_char(name: String, value: Char): Intent

android :: Intent :: add_extra_char

Adds extra data corresponding to char java type
fun add_extra_char_sequence(name: String, value: String): Intent

android :: Intent :: add_extra_char_sequence

Adds extra data corresponding to CharSequence java type
fun add_extra_double(name: String, value: Float): Intent

android :: Intent :: add_extra_double

Adds extra data corresponding to double java type
fun add_extra_float(name: String, value: Float): Intent

android :: Intent :: add_extra_float

Adds extra data corresponding to float java type
fun add_extra_int(name: String, value: Int): Intent

android :: Intent :: add_extra_int

Adds extra data corresponding to int java type
fun add_extra_long(name: String, value: Int): Intent

android :: Intent :: add_extra_long

Adds extra data corresponding to long java type
fun add_extra_short(name: String, value: Int): Intent

android :: Intent :: add_extra_short

Adds extra data corresponding to short java type
fun add_extra_string(name: String, value: String): Intent

android :: Intent :: add_extra_string

Adds extra data corresponding to String java type
fun add_flags(flags: Int): Intent

android :: Intent :: add_flags

Add a flag to be used by the intent
fun categories: nullable HashSet[String]

android :: Intent :: categories

Returns all the intent categories or null if none
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun data: nullable String

android :: Intent :: data

Returns the data Uri the data is operating on or null if none
fun data=(data_uri: String)

android :: Intent :: data=

Sets the data uri the intent is working on
fun destroy

android :: Intent :: destroy

Deletes intent global reference
fun extra_bool(name: String, def_value: Bool): Bool

android :: Intent :: extra_bool

Retrieves the Bool extra stored with the corresponding name
fun extra_bool_array(name: String): Array[Bool]

android :: Intent :: extra_bool_array

Retrieves the Array[Bool] extra stored as Java boolean[] with the
fun extra_byte(name: String, def_value: Int): Int

android :: Intent :: extra_byte

Retrieves the Int extra stored as Java byte with the corresponding name
fun extra_byte_array(name: String): Array[Int]

android :: Intent :: extra_byte_array

Retrieves the Array[Int] extra stored as Java byte[] with the
fun extra_char(name: String, def_value: Char): Char

android :: Intent :: extra_char

Retrieves the Char extra stored as Java char with the
fun extra_char_array(name: String): Array[Char]

android :: Intent :: extra_char_array

Retrieves the Array[Char] extra stored as Java char[] with the
fun extra_char_sequence(name: String, def_value: String): String

android :: Intent :: extra_char_sequence

Retrieves the String extra stored as Java CharSequence with the
fun extra_char_sequence_array(name: String): Array[String]

android :: Intent :: extra_char_sequence_array

Retrieves the Array[String] extra stored as Java CharSequence[]
fun extra_char_sequence_array_list_extra(name: String): Array[String]

android :: Intent :: extra_char_sequence_array_list_extra

Retrieves the Array[String] extra stored as Java ArrayList<CharSequence>
fun extra_double(name: String, def_value: Float): Float

android :: Intent :: extra_double

Retrieves the Float extra stored as Java double with the corresponding
fun extra_double_array(name: String): Array[Float]

android :: Intent :: extra_double_array

Retrieves the Array[Float] extra stored as Java double[] with the
fun extra_float(name: String, def_value: Float): Float

android :: Intent :: extra_float

Retrieves the Float extra stored as Java float with the corresponding
fun extra_float_array(name: String): Array[Float]

android :: Intent :: extra_float_array

Retrieves the Array[Float] extra stored as Java float[] with the
fun extra_int(name: String, def_value: Int): Int

android :: Intent :: extra_int

Retrieves the Int extra stored as Java int with the corresponding
fun extra_int_array(name: String): Array[Int]

android :: Intent :: extra_int_array

Retrieves the Array[Int] extra stored as Java int[] with the
fun extra_long(name: String, def_value: Int): Int

android :: Intent :: extra_long

Retrieves the Int extra stored as Java long with the corresponding
fun extra_long_array(name: String): Array[Int]

android :: Intent :: extra_long_array

Retrieves the Array[Int] extra stored as Java long[] with the
fun extra_short(name: String, def_value: Int): Int

android :: Intent :: extra_short

Retrieves the Int extra stored as Java short with the corresponding
fun extra_short_array(name: String): Array[Int]

android :: Intent :: extra_short_array

Retrieves the Array[Int] extra stored as Java short[] with the
fun extra_string(name: String): String

android :: Intent :: extra_string

Retrieves the String extra stored as Java String with the corresponding
fun extra_string_array(name: String): Array[String]

android :: Intent :: extra_string_array

Retrieves the Array[String] extra stored as Java String[] with the
fun extra_string_array_list(name: String): Array[String]

android :: Intent :: extra_string_array_list

Retrieves the Array[String] extra stored as Java ArrayList<String>
fun flags: Int

android :: Intent :: flags

Returns an Int representing all the intent flags
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun has_category(category: String): Bool

android :: Intent :: has_category

Returns true if the intent contains the given category
fun has_extra(extra: String): Bool

android :: Intent :: has_extra

Returns true if the intent contains the given extra
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
protected fun intent: NativeIntent

android :: Intent :: intent

protected fun intent=(intent: NativeIntent)

android :: Intent :: intent=

intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun mime_type=(mime_type: String)

android :: Intent :: mime_type=

Sets an explicit MIME data type to be handled by the intent, for example
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun package_name: nullable String

android :: Intent :: package_name

Returns the package name the intent resolution is limited to
fun remove_category(category: String): Intent

android :: Intent :: remove_category

Removes the given category
fun remove_extra(name: String): Intent

android :: Intent :: remove_extra

Removes the given extra
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
fun set_class_name(package_name: String, class_name: String): Intent

android :: Intent :: set_class_name

Specify the class to be launched by the intent
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun type_name: nullable String

android :: Intent :: type_name

Returns the set MIME and null if none
package_diagram android::Intent Intent core::Object Object android::Intent->core::Object

Parents

interface Object

core :: Object

The root of the class hierarchy.

Class definitions

android $ Intent
# Services allowing to launch an activity and start/stop services
class Intent
	protected var intent: NativeIntent = (new NativeIntent).new_global_ref is lazy

	# The general action to be performed
	#
	# ~~~nitish
	# # TODO better example
	# intent.action = intent_action.view.to_s
	# ~~~
	fun action=(action: String)
	do
		sys.jni_env.push_local_frame(1)
		intent.action = action.to_java_string
		sys.jni_env.pop_local_frame
	end

	# Returns the action to be performed or `null` if none
	fun action: nullable String do
		var result = intent.action.to_s
		if result == "" then return null
		return result
	end

	# Add category to the intent
	# Only activities providing all of the requested categories will be used
	#
	# ~~~nitish
	# # TODO better example
	# intent.add_category(intent_category.home.to_s)
	# ~~~
	# Returns `self` allowing fluent programming
	fun add_category(category: String): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_category(category.to_java_string)
		sys.jni_env.pop_local_frame
		return self
	end

	# Returns all the intent categories or `null` if none
	fun categories: nullable HashSet[String]
	do
		var string_set = intent.categories
		if string_set.is_empty then return null

		return string_set
	end

	# Sets the data uri the intent is working on
	# Automatically clears the type field set using `mime_type=` method as it
	# uses the data uri to determine the MIME type
	# Note: The Uri string has to comply with RFC 2396
	fun data=(data_uri: String)
	do
		sys.jni_env.push_local_frame(1)
		intent.data = data_uri.to_java_string
		sys.jni_env.pop_local_frame
	end

	# Returns the data Uri the data is operating on or `null` if none
	fun data: nullable String
	do
		var result = intent.data.to_s
		if result == "" then return null
		return result
	end

	# Sets an explicit MIME data type to be handled by the intent, for example
	# the return data type
	# Automatically clears the data type field set using `data=` method
	fun mime_type=(mime_type: String)
	do
		sys.jni_env.push_local_frame(1)
		intent.mime_type = mime_type.to_java_string
		sys.jni_env.pop_local_frame
	end

	# Add a flag to be used by the intent
	#
	# ~~~nitish
	# # TODO better example
	# intent.add_flags(intent_flag.activity_new_task)
	# ~~~
	# Returns `self` allowing fluent programming
	fun add_flags(flags: Int): Intent
	do
		intent.add_flags(flags)
		return self
	end

	# Returns an `Int` representing all the intent flags
	fun flags: Int do return intent.flags

	# Returns the package name the intent resolution is limited to
	# Returns `null` if not defined
	fun package_name: nullable String do
		var result = intent.get_package.to_s
		if result == "" then return null
		return result
	end

	# Returns the set MIME and `null` if none
	fun type_name: nullable String do
		var result = intent.get_type.to_s
		if result == "" then return null
		return result
	end

	# Returns `true` if the intent contains the given category
	fun has_category(category: String): Bool
	do
		sys.jni_env.push_local_frame(1)
		var return_value = intent.has_category(category.to_java_string)
		sys.jni_env.pop_local_frame
		return return_value
	end

	# Returns `true` if the intent contains the given extra
	fun has_extra(extra: String): Bool
	do
		sys.jni_env.push_local_frame(1)
		var return_value = intent.has_extra(extra.to_java_string)
		sys.jni_env.pop_local_frame
		return return_value
	end

	# Removes the given category
	# Returns `self` allowing fluent programming
	fun remove_category(category: String): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.remove_category(category.to_java_string)
		sys.jni_env.pop_local_frame
		return self
	end

	# Removes the given extra
	# Returns `self` allowing fluent programming
	fun remove_extra(name: String): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.remove_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return self
	end

	# Retrieves the `Array[Bool]` extra stored as Java `boolean[]` with the
	# corresponding name
	fun extra_bool_array(name: String): Array[Bool]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.boolean_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Bool` extra stored with the corresponding name
	fun extra_bool(name: String, def_value: Bool): Bool
	do
		sys.jni_env.push_local_frame(1)
		var nit_bool = intent.boolean_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_bool
	end

	# Retrieves the `Array[Int]` extra stored as Java `byte[]` with the
	# corresponding name
	fun extra_byte_array(name: String): Array[Int]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.byte_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Int` extra stored as Java `byte` with the corresponding name
	fun extra_byte(name: String, def_value: Int): Int
	do
		sys.jni_env.push_local_frame(1)
		var nit_int = intent.byte_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_int
	end

	# Retrieves the `Array[Char]` extra stored as Java `char[]` with the
	# corresponding name
	# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
	fun extra_char_array(name: String): Array[Char]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.char_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Char` extra stored as Java `char` with the
	# corresponding name
	# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
	fun extra_char(name: String, def_value: Char): Char
	do
		sys.jni_env.push_local_frame(1)
		var nit_char = intent.char_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_char
	end

	# Retrieves the `String` extra stored as Java `CharSequence` with the
	# corresponding name
	fun extra_char_sequence(name: String, def_value: String ): String
	do
		sys.jni_env.push_local_frame(1)
		var nit_charseq =
			intent.char_sequence_extra(name.to_java_string).to_s
		sys.jni_env.pop_local_frame
		return nit_charseq
	end

	# Retrieves the `Array[String]` extra stored as Java `ArrayList<CharSequence>`
	# with the corresponding name
	fun extra_char_sequence_array_list_extra(name: String): Array[String]
	do
		sys.jni_env.push_local_frame(1)
		var string_array = intent.char_sequence_array_list_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return string_array
	end

	# Retrieves the `Array[String]` extra stored as Java `CharSequence[]`
	# with the corresponding name
	fun extra_char_sequence_array(name: String): Array[String]
	do
		sys.jni_env.push_local_frame(1)
		var string_array = intent.char_sequence_array_list_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return string_array
	end

	# Retrieves the `Array[Float]` extra stored as Java `double[]` with the
	# corresponding name
	fun extra_double_array(name: String): Array[Float]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.double_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Float` extra stored as Java `double` with the corresponding
	# name
	fun extra_double(name: String, def_value: Float): Float
	do
		sys.jni_env.push_local_frame(1)
		var nit_float = intent.double_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_float
	end

	# Retrieves the `Array[Float]` extra stored as Java `float[]` with the
	# corresponding name
	fun extra_float_array(name: String): Array[Float]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.float_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Float` extra stored as Java `float` with the corresponding
	# name
	fun extra_float(name: String, def_value: Float): Float
	do
		sys.jni_env.push_local_frame(1)
		var nit_float = intent.float_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_float
	end

	# Retrieves the `Array[Int]` extra stored as Java `int[]` with the
	# corresponding name
	fun extra_int_array(name: String): Array[Int]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.int_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Int` extra stored as Java `int` with the corresponding
	# name
	fun extra_int(name: String, def_value: Int): Int
	do
		sys.jni_env.push_local_frame(1)
		var nit_int = intent.int_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_int
	end

	# Retrieves the `Array[Int]` extra stored as Java `long[]` with the
	# corresponding name
	fun extra_long_array(name: String): Array[Int]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.long_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Int` extra stored as Java `long` with the corresponding
	# name
	fun extra_long(name: String, def_value: Int): Int
	do
		sys.jni_env.push_local_frame(1)
		var nit_int = intent.long_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_int
	end

	# Retrieves the `Array[Int]` extra stored as Java `short[]` with the
	# corresponding name
	fun extra_short_array(name: String): Array[Int]
	do
		sys.jni_env.push_local_frame(1)
		var nit_array = intent.short_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return nit_array
	end

	# Retrieves the `Int` extra stored as Java `short` with the corresponding
	# name
	fun extra_short(name: String, def_value: Int): Int
	do
		sys.jni_env.push_local_frame(1)
		var nit_int = intent.short_extra(name.to_java_string, def_value)
		sys.jni_env.pop_local_frame
		return nit_int
	end

	# Retrieves the `Array[String]` extra stored as Java `String[]` with the
	# corresponding name
	fun extra_string_array(name: String): Array[String]
	do
		sys.jni_env.push_local_frame(1)
		var string_array = intent.string_array_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return string_array
	end

	# Retrieves the `Array[String]` extra stored as Java `ArrayList<String>`
	# with the corresponding name
	fun extra_string_array_list(name: String): Array[String]
	do
		sys.jni_env.push_local_frame(1)
		var string_array = intent.string_array_list_extra(name.to_java_string)
		sys.jni_env.pop_local_frame
		return string_array
	end

	# Retrieves the `String` extra stored as Java `String` with the corresponding
	# name
	fun extra_string(name: String): String
	do
		sys.jni_env.push_local_frame(1)
		var nit_java_string = intent.string_extra(name.to_java_string).to_s
		sys.jni_env.pop_local_frame
		return nit_java_string
	end

	# Adds extra data corresponding to `double` java type
	# Returns `self` allowing fluent programming
	fun add_extra_double(name: String, value: Float): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_double(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `double[]` java type
	# Returns `self` allowing fluent programming
	fun add_extra_array_of_double(name: String, value: Array[Float]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_double(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `char` java type
	# Returns `self` allowing fluent programming
	# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
	fun add_extra_char(name: String, value: Char): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_char(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `char[]` java type
	# Returns `self` allowing fluent programming
	# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
	fun add_extra_array_of_char(name: String, value: Array[Char]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_char(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `CharSequence` java type
	# Returns `self` allowing fluent programming
	fun add_extra_char_sequence(name: String, value: String): Intent
	do
		sys.jni_env.push_local_frame(2)
		intent.add_extra_char_sequence(name.to_java_string, value.to_java_string)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `CharSequence[]` java type
	# Returns `self` allowing fluent programming
	fun add_extra_array_of_char_sequence(name: String, value: Array[String]): Intent
	do
		sys.jni_env.push_local_frame(value.length + 1)
		var java_string_array = new Array[JavaString]
		for element in value do
			java_string_array.push(element.to_java_string)
		end
		intent.add_extra_array_of_char_sequence(name.to_java_string, java_string_array)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `bundle` java type
	# Returns `self` allowing fluent programming
	fun add_extra_bundle(name: String, value: NativeBundle): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_bundle(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `int` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `int`*
	# Consider using add_extra_long instead
	fun add_extra_int(name: String, value: Int): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_int(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `int[]` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `int[]`*
	# Consider using add_extra_array_of_long instead
	fun add_extra_array_of_int(name: String, value: Array[Int]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_int(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `ArrayList<Integer>` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `ArrayList<Integer>`*
	# Consider using add_extra_array_of_long instead
	fun add_extra_array_list_of_int(name: String, value: Array[Int]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_list_of_int(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `byte` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `byte`*
	# Consider using add_extra_array_of_long instead
	fun add_extra_byte(name: String, value: Int): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_byte(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `byte[]` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `byte[]`*
	# Consider using add_extra_array_of_long instead
	fun add_extra_array_of_byte(name: String, value: Int): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_byte(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `long` java type
	# Returns `self` allowing fluent programming
	fun add_extra_long(name: String, value: Int): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_long(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `long[]` java type
	# Returns `self` allowing fluent programming
	fun add_extra_array_of_long(name: String, value: Array[Int]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_long(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `float` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible loss of precision as Nit `Float` corresponds to*
	# *java `double` and the expected value is a java `float`*
	# Consider using add_extra_double
	fun add_extra_float(name: String, value: Float): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_float(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `float[]` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible loss of precision as Nit `Float` corresponds to*
	# *java `double` and the expected value is a java `float[]`*
	# Consider using add_extra_array_of_double
	fun add_extra_array_of_float(name: String, value: Array[Float]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_float(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `String` java type
	# Returns `self` allowing fluent programming
	fun add_extra_string(name: String, value: String): Intent
	do
		sys.jni_env.push_local_frame(2)
		intent.add_extra_string(name.to_java_string, value.to_java_string)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `String[]` java type
	# Returns `self` allowing fluent programming
	fun add_extra_array_of_string(name: String, value: Array[String]): Intent
	do
		sys.jni_env.push_local_frame(value.length + 1)
		var java_string_array = new Array[JavaString]
		for element in value do
			java_string_array.push(element.to_java_string)
		end
		intent.add_extra_array_of_string(name.to_java_string, java_string_array)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `ArrayList<String>` java type
	# Returns `self` allowing fluent programming
	fun add_extra_array_list_of_string(name: String, value: Array[String]): Intent
	do
		sys.jni_env.push_local_frame(value.length + 1)
		var java_string_array = new Array[JavaString]
		for element in value do
			java_string_array.push(element.to_java_string)
		end

		intent.add_extra_array_list_of_string(name.to_java_string, java_string_array)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `boolean` java type
	# Returns `self` allowing fluent programming
	fun add_extra_bool(name: String, value: Bool): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_bool(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `boolean[]` java type
	# Returns `self` allowing fluent programming
	fun add_extra_array_of_bool(name: String, value: Array[Bool]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_bool(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `short` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `short`*
	# Consider using add_extra_long instead
	fun add_extra_short(name: String, value: Int): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_short(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Adds extra data corresponding to `short[]` java type
	# Returns `self` allowing fluent programming
	# *Be aware of possible integer overflow as Nit `Int` corresponds to*
	# *java `long` and the expected value is a java `short[]`*
	# Consider using add_extra_array_of_long instead
	fun add_extra_array_of_short(name: String, value: Array[Int]): Intent
	do
		sys.jni_env.push_local_frame(1)
		intent.add_extra_array_of_short(name.to_java_string, value)
		sys.jni_env.pop_local_frame
		return self
	end

	# Store `value` as a serialized Json string
	# java method according to value type
	# Returns `self` allowing fluent programming
	fun []=(name: String, value: nullable Serializable): Intent
	do
		var serialized_string = new StringWriter
		var serializer = new JsonSerializer(serialized_string)
		serializer.serialize(value)

		add_extra_string(name, serialized_string.to_s)
		return self
	end

	# Retrieve an `Object` stored via `[]=` function
	fun [](name: String): nullable Object
	do
		var serialized_string = self.extra_string(name)
		if serialized_string == "" then return null

		var deserializer = new JsonDeserializer(serialized_string)
		return deserializer.deserialize
	end

	# Specify the class to be launched by the intent
	fun set_class_name(package_name: String, class_name: String): Intent
	do
		sys.jni_env.push_local_frame(2)
		intent.set_class_name(package_name.to_java_string, class_name.to_java_string)
		sys.jni_env.pop_local_frame
		return self
	end

	# Deletes intent global reference
	fun destroy do self.intent.delete_global_ref

	# Returns a human readable representation of the intent
	redef fun to_s do return intent.to_native_s.to_s
end
lib/android/intent/intent_api10.nit:630,1--1307,3

android :: intent_api15 $ Intent
redef class Intent
	fun selector=(selector: NativeIntent) do intent.selector = selector
end
lib/android/intent/intent_api15.nit:43,1--45,3