The SignedMIDlet illustrates the behavior of an unsigned MIDlet when it executes a protected method call.
When the user selects Load in the opening view, the MIDlet
starts an HTTP operation that attempts to read from the URL http://www.w3.org
. If the reading operation is successful,
the MIDlet displays the amount of bytes read. Otherwise, the MIDlet
displays an error message.
Since the reading operation uses a protected method (in this case,
the Connector.open
method), an unsigned MIDlet
displays a security prompt to allow the user to decide whether security-sensitive
features are used or not.
Figure: SignedMIDlet security prompt
For instructions on how to implement the MIDlet, see section Implementation.