This is possible. You have to register the event EVENT_PROFILE_DOWNLOAD
during the applet installation.
toolkitRegistry = ToolkitRegistrySystem.getEntry();
toolkitRegistry.setEvent(EVENT_PROFILE_DOWNLOAD);
// in case you need a menu later, too:
toolkitRegistry.initMenuEntry( ...
When the SIM is started the modem will always execute the TERMINAL PROFILE commmand. This will trigger the registered EVENT_PROFILE_DOWNLOAD
by processToolkit
. In case you have a menu the menu selection will be handled also by processToolkit
. The event will be EVENT_MENU_SELECTION
then.
From processToolkit
you can execute any necessary behavior, e.g. displaying a text.
ProactiveHandlerSystem.getTheHandler().clear();
ProactiveHandlerSystem.getTheHandler().initDisplayText((byte) 0x81, 0x04, array, offset, (short) (length));
byte res = ProactiveHandlerSystem.getTheHandler().send();
return res == RES_CMD_PERF;
The array would be the ASCII encoding of your text.
Consult the UICC API as startign point.