Showing posts with label Server. Show all posts
Showing posts with label Server. Show all posts

Thursday, August 2, 2012

Alarm clock apps, What is media server? [From the Forums]

From the Forums

Just in case you missed out on some of the Android news today, now is the time to go ahead and get yourself fully caught up. Here on the blogs and in the Android Central Forums there is plenty to talk about. Have some questions? Need some help or just looking to chat Android? You know where to go, check out some of the threads below to get started.

We've got nearly 1 million members helping members and nearly 2 million posts in our Android Forums. Are you one of them? Join today!



Tuesday, January 3, 2012

How to Send SMS From a Web Server to an Android Phone Using Java

The Java "wireless.messaging" library provides Android developers with a method to send SMS messages using the Java language. An SMS message is a text-based message you send to another phone number. Text messaging is a basic service offered by wireless services. You must specify a phone number to send the message and the "sms://" protocol to trigger the right services on the Android device.

Difficulty:Moderate1

Open the Java Eclipse software development program on your desktop. Open the Android project in which you want to add an SMS module. Double-click the Java file you want to use to send the message.

2

Add the wireless messaging library to the top of the file. You need this library to call the necessary functions. Copy and paste the following import statement to the top of the file:

import javax.wireless.messaging.*;

3

Create a connection to the wireless phone number. The following code sets up a variable with the target phone number:

this.connection=(MessageConnection) Connector.open("sms://5555555555:2948");

The "2948" is the port number used to run the SMS service. Replace the "5555555555" with the mobile phone number you want as your recipient.

4

Set up the message content. The following code sets up a string variable with the content "Hello, Recipient" as the message:

String message ="Hello, Recipient";

5

Send the message. The following code packages the SMS message and sends it to your recipient phone number:

this.connection.send(message);

Read Next:

Copyright © 1999-2012 Demand Media, Inc.
Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy. Ad Choices en-US


View the original article here