Merge: Functional api
[nit.git] / lib / android / intent / intent.nit
1 # This file is part of NIT (http://www.nitlanguage.org).
2 #
3 # Copyright 2014 Frédéric Vachon <fredvac@gmail.com>
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 # Services allowing to launch activities and start/stop services using
18 # `android.content.Intent` for the android platform.
19 #
20 # By default, API 10 is imported. Import more recent API to suit your needs.
21 #
22 # There's two ways of defining which activity/service to be launched :
23 # * Provide an explicit class to be launched with `set_class_name`
24 # * Provide a description of the activity to perform and let the system determine the best application to run
25 #
26 # To provide a description, you need to assign values using one or more of these
27 # methods :
28 # * `action=`
29 # * `data=`
30 # * `add_category`
31 # * `mime_type=`
32 #
33 # The Intent class wraps most of the `android.content.Intent` constants and is
34 # designed to be used with this syntax :
35 # * Action : `intent_action.main.to_s`
36 # * Category : `intent_category.home.to_s`
37 # * Extra : `intent_extra.phone_number.to_s`
38 # * Flag : `intent_flag.activity_brought_to_front`
39 #
40 # For further details about these constants meaning, refer to the official
41 # android Intent documentation : [[Android Intent documentation|http://developer.android.com/reference/android/content/Intent.html]]
42 module intent
43
44 import intent_api10