Joke Collection Website - Blessing messages - How to automatically send short messages to the simulator of this machine?
How to automatically send short messages to the simulator of this machine?
Private Void Send (String Content, String Mobile){// Get the manager for sending short messages, and use android.telephony.SMS manager SMS manager = SMS manager.getdefault (); //If the short message content is too long, send if (content. Length ()) in segments > 70){ // Use SMS Manager to segment the short message content and return the segmented ArrayList Contents = SMS Manager. Divide the message (content); For(String msg: contents){ // Use SMS manager to send SMS content//Parameter 1 For SMS receiver//Parameter 3 for SMS content//Others can be set as empty SMS manager. Send SMS (mobile phone, empty, msg, empty, empty); }//Otherwise, send} else {SMS manager. Sendtextmessage (mobile, null, content, null, null) once; }} The method of sending short messages in the background. . Add permission to send short messages.
- Related articles
- Samsung short messages can only be received but not sent.
- Do hummingbirds crowdsource insurance every day?
- What is the short message from ABC that there is no balance? Just saved 1000 yuan. The text message only said the deposit amount, not the balance.
- 5g SMS shows delivery, but MMS doesn't.
- How to activate Bank of China corporate account balance SMS notification
- Harbin social security bureau manual consultation telephone number
- How to set up the Dada knight station?
- Shanxi Shuozhou logistics recovery notification SMS
- Will Zhong Jun Law Firm investigate the crime scene?
- How to restore the handwriting function of mobile phone? Come and have a look.