STK learning in Android

Source: Internet
Author: User
STK process processing. display_text is used as an example.
 
1. RIL reports the message.
RIL. Java receives the reported message ril_unsol_stk_proactive_command
Call mstkprocmdregistrant
Stkservice. Java receives the handlemessage msg_id_proactive_command
 
2. decode the reported data
 
Call rilmessagedecode to decode the message.
Call the make function of commandparamsfactory to decode
The parsed data has been stored in the text variable of textmessage.
 
STK decoding function in commandparams. Java commanddetails. Java
Define comprehensiontlvtag in stkservice. Java
 
Take global card as an Example
D0628103012100820281020D570870B951FB786E8BA48FDB51654E2D56FD79FB52A84E3A60A863D04F9B76845B9E7528670D52A1002C4F539A8C4E305BCC591A5F69768479FB52A865705B57751F6D3BFF0C53D66D8852198FDB5165624B673A754C9762
 
TS 102 223
D0 proactive UICC command tag
62 length 
81 command details tag
03 command length 
01 command number 
21 00 display text
82 devices identities tag
02 length 
81  source UICC
02  Display
0D text string tag
57  length 
O8 UCS2
 
Use the make function of commandparamsfactory as the guide to parse byte values. See
(Etsi ts 102 221, etsi ts 102 223 Protocol)
 
3. The framework reports data to the upper layer.
 
Processing handlerilmsg messages in stkservice. Java
The command type msg_id_proactive_command will display the text
cmdParams = (CommandParams) rilMsg.mData;
Handle handleproactivecommand
Display_text
It is sent to stkcmdreceiver through stk_effec_action intent type. It is started by changing the value of aggreger.
StkAppService
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.