Many times we need to use our own app to make some phone calls, text messages and other operations, then how to use the code to implement it, here are some simple ways to implement these operations.Call:Nsurl *url = [Nsurl urlwithstring:@ "tel://10010"];[[UIApplication sharedapplication] openurl:url];Disadvantage: Af
In mobile development we will often need to call phone calls, text messaging and email functions, the following is my summary of the method:1. Call//Method 1 The most commonly used method nsurl *telurl = [Nsurl urlwithstring: "tel://13161906451"]; UIWebView *webview = [[UIWebView alloc] Initwithframe:cgrectzero]; [WebView loadrequest:[nsurlrequest requestwithurl:telurl]];//Method 2 Cons: This method stops a
[Instance] JAVA calls the interface to send text and text messages. You do not need to jump to the details page.
Package com. test; import java. io. IOException; import java. io. inputStream; import java. io. outputStream; import java.net. httpURLConnection; import java.net. malformedURLException; import java.net. URL;
Auto SMS is an Android app that allows you to send pre-configured text messages at any time. The most useful scenario is when you are driving. If you cannot resume text messages when something is going on, Auto SMS can send you a message. You can not only use this reply mess
: (mfmailcomposeresult) result Error: (nserror *) error{//close Mail Interface [controller Dismissviewcontrolleranimated:yes completion:nil ]; if (Result = = mfmailcomposeresultcancelled) {nslog (@ "Cancel Send" ); } else if (result = = Mfmailcomposeresultsent) { nslog (@ "already issued" ); } else {nslog (@); }}Open Other Common FilesIf you want to open some common files, such as HTML, TXT, PDF, PPT, etc., you can use UIWebView openJust tell the URL of the UIWebView fi
How can I send text messages and make phone calls on Ubuntu mobile phones?
For some platform security reasons, Ubuntu mobile phones do not currently provide APIs for third-party developers to send text messages and call calls. How
"];[[UIApplication sharedapplication] openurl:url];3. Use WebView to refer back and be legal, recommendedSelf.webview = [[UIWebView alloc] initWithFrame:self.view.bounds];Lazy loading, also known as deferred loading, is not loaded (overriding the Get method) when needed, (it takes up less memory)The role of lazy loadingif (Self.webview = = nil) {Self.webview = [[UIWebView alloc] init];}NSLog (@ "%p", Self.webview);Nsurl *url = [Nsurl urlwithstring:@ "tel://10086"];Nsurlrequest *request = [Nsurlr
Mode one: After dialing using this method, when the phone hangs up and does not reverse the application, will stay in the phone record interface, will not back to the application nsurl *url = [Nsurl urlwithstring:@ "tel:// 13838383838 "]; [[uiapplication sharedapplication] openurl:url]; Mode II: After the call will prompt the user whether to dial, When the phone hangs up, it's back to the app, but the shelves are audited, because it's Apple's priva
screen is open no standby , divided into the following three steps:1. ADB shell am start-a android.intent.action.sendto-d sms:10086--es sms_body HelloOpen the SMS app with the current focus in the text box650) this.width=650; "title=" Device-2015-05-16-161254.png "alt=" wkiol1vw_d-hzrvnaad8tidc3ga257.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m02/6c/ea/wkiol1vw_d-hzrvnaad8tidc3ga257.jpg "/>2.ADB Shell Input keye
}15 // This sentence is applicable to messages indicating that the text message has been sent successfully.16 // toast. maketext (mysmsactivity. This, R. String. Success,17 // toast. length_long). Show ();18}
Call number:
1 @ override2 Public void onclick (view V)3 {4 string phonenum = phoneedittext. gettext (). tostring ();5 // use intent6 intent = new intent ("android. Intent. Action. Call", Uri. parse ("
First, open the simulator.
Then, connect to the simulator
C: \ Users \ billgates> Telnet localhost 5554
Android Console: Type 'help' for a list of commandsOK
5554 indicates the port of the simulator on the local machine. You can use ADB devices to view the Port:
C: \ Users \ billgates> ADB Devices
List of devices attachedEmulator-5554 Device
Connect to the simulator and enter the HELP command to view help. Enter the command and press enter to view the command format.
GEO is GPS, SMS is a
The following methods are all tested successfully:
1. Use commands to simulate
(1) simulate incoming calls
1. Open command line CMD and enter Telnet and press Enter.2. Enter o localhost 5554Press enter to connect to emulator.3. Enter GSM call 13656563636. If OK is displayed, the call is successful (the phone number can be specified at will)
(2) simulate text messages
Didfinishwithresult: ( Mfmailcomposeresult) Result Error: (Nserror *) error{ //Prompt user NSLog according to different status (@ "%d", result); [Self Dismissviewcontrolleranimated:yes completion:nil];}③ Call1. Method 1-(void) tel2{ //However: the Telprompt protocol belongs to Apple's private agreement, and once this protocol is used in the program, the program cannot be on the shelves /system developed for jailbroken machines, you can use this protocol nsur
original one. Who knows)
If you have missed calls or text messages, IOS will add numbers on the icons to remind you, just like this
It looks good. I took it to the desktop (now many software have implemented this function, so I just say it's just fun)
The hierarchical structure of this item should be analyzed (or I understand) like this.
The goal is found,
You can use either of the following methods:
1. command line:
First, enable the simulator, and then enter "Telnet localhost XXX" in the command line. Enter the first few digits of the name of the simulator you started in the xxx field, which is generally 5554; after you press enter, "OK" indicates that the connection is successful. Then, you can use SMS send and GSM call to simulate SMS receiving and answering.
SMS:
SMS send 10086 "this is a test." // It seems that Chinese characters are
If you want to listen to text messages received by yourself or others, and set the blacklist, you need the following functions to listen to text messages and handle prompts or responses:
When the system receives a text message, it sends a broadcast.Intent, Intent action nam
The following code calls the cloud communication platform text message sending in the background written in java:
Cloud communication platform api address: http://docs.cloopen.com/index.php/%E6%A8%A1%E6%9D%BF%E7%9F%AD%E4%BF%A1
Package com. msg. util; import java. io. inputStream; import java. text. simpleDateFormat; import java. util. arrayList; import java. ut
Call and send text messages on the simulator. You can also use the emulator control of the ADT plug-in of eclipse on the command line. The specific method is as follows.
Command line:
Assume that the port number of the simulator you are currently enabling (on the title bar of the simulator) is 5554.
1. Open the command line and enter Telnet localhost 5554 and press Enter. The following prompt is displayed,
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.