When the SIM card is being searched for, the community broadcast prompts "information" to report a shutdown.

Source: Internet
Author: User
From the android 4.4 KK version, the whole CB processing is put in the MMS process.
Cell broadcasting requires the SIM card to be properly initialized before you can enable the cell broadcasting. When the SIM card is searched, it indicates that the current SIM card has not been initialized successfully. In this case, there is no way to enable the cell broadcasting.
As the cell broadcasting runs in the MMS process, the MMS process runs abnormally and reports "information" to stop.


Make the following changes in cellbroadcastcheckbox. Java:
Use the following method:
Private void setcbstate (final Boolean state ){
Mmslog. D (log_tag, "setcbstate start ");
If (mlistener! = NULL ){
Mlistener. onstarted (cellbroadcastcheckbox. This, false );
}
New thread (New runnable (){
Public void run (){
Mmslog. D (log_tag, "activatecellbroadcastsms start ");
Boolean issetsuccess = encapsulatedsmsmanager. activatecellbroadcastsms (State, mslotid );
Mmslog. D (log_tag, "activatecellbroadcastsms end issetsuccess =" + issetsuccess );
If (! Issetsuccess ){
Handlesetstateresponse ();
} Else {
Recoverchannelsettings setting =
New recoverchannelsettings (mslotid, getcontext (). getcontentresolver ());
Setting. updatechannelstatus ();
If (mlistener! = NULL ){
Mlistener. onfinished (cellbroadcastcheckbox. This, false );
}
}
Mmslog. D (log_tag, "setcbstate end ");
}
}). Start ();
}
To:
Private void setcbstate (final Boolean state ){
Mmslog. D (log_tag, "setcbstate start ");
If (mlistener! = NULL ){
Mlistener. onstarted (cellbroadcastcheckbox. This, false );
}
Mmslog. D (log_tag, "activatecellbroadcastsms start ");
Boolean issetsuccess = encapsulatedsmsmanager. activatecellbroadcastsms (State, mslotid );
Mmslog. D (log_tag, "activatecellbroadcastsms end issetsuccess =" + issetsuccess );
If (! Issetsuccess ){
Handlesetstateresponse ();
} Else {
New thread (New runnable (){
Public void run (){
Recoverchannelsettings setting =
New recoverchannelsettings (mslotid, getcontext (). getcontentresolver ());
Setting. updatechannelstatus ();
If (mlistener! = NULL ){
Mlistener. onfinished (cellbroadcastcheckbox. This, false );
}
Mmslog. D (log_tag, "setcbstate end ");
}
}). Start ();
}
}

When the SIM card is being searched for, the community broadcast prompts "information" to report a shutdown.

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.