background image
C H A P T E R 2 1
Routing Interface
Using Routing
Manually Putting Away Items
If an item is not put away automatically, it resides in the In Box until the user
chooses to put it away manually by tapping the Put Away button. When the user
taps the Put Away button, the In Box displays a slip showing to which application
the item will be put away. This application is the one that matches the
slot in the item. The In Box sends the
message to the base view
of that application. The item is passed as a parameter.
The item passed to your application's
method is the entry from
the In Box. It has several slots in it that are used by the In Box or the transport. The
data your application uses is contained in the
Because the item could have been sent by a custom transport that sends
multiple-item target objects (such as those created by
you might need to check if the
slot contains such an object by using
. If so, you can get a cursor for the object by using
, and then iterate over the cursor to handle individual items.
If the
method returns
, this signals that the item could not
be put away and the In Box leaves the item in the In Box and an alert is displayed
telling the user that the item could not be put away.
If the
method returns a non-
value, it is assumed that the
application handled the item. The item is either saved in the In Box or deleted from
the In Box, depending on the user's preference as set in the Put Away slip.
If multiple applications have registered to accept data of the item's class, the system
displays a picker listing those applications in the Put Away slip. The application
that matches the
slot of the item is listed as the default choice. If there
is no
slot, or the application is missing, then a different application is
the default choice. The user can choose the application to which the data is to be
sent, and the
message is sent to that application.
The registry used for this operation is called the application data class registry;
note that it is different from the In Box application registry mentioned above.
Applications can register to accept data of one or more classes by using the
It is recommended that all applications wanting to receive items through the In Box
register their capability to receive data of particular classes by calling the
function. If your application is no longer interested in data of
these classes, or your application is being uninstalled, you can unregister to receive
these data classes by using the
You can check which applications can accept data of a particular class by using the
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна