Send SMS from one emulator instance to another

by Devesh » Sat, 30 Aug 2008 02:25:05 GMT


Sponsored Links
 Hi,
I have read many posts on the Android developers forum, however, I am
not able to resolve the problem.

I am trying to send SMS text message from one emulator instance to
another emulator instance on the same machine, but the second emulator
instance does not display the text message. If however, I use the
telnet window and send sms from there, the second emulator instance
displays the text message.
In the first emulator instance, I am using this code:-

SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage("5555", null, "Hello world", null, null, null);

where the first parameter is the sendTo address, which is actually the
port# on which the second emulator is running.
I have used several options on this parameter value, such as the
device name "emulator-tcp-5555" and even the telnet port#  "5554".
However, the second emulator instance just does not display the text
message sent from the first emulator instance.

Following is the manifest of the sms sender activity:-
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
    package="com.orange.mobicomm.sms">
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.WRITE_SMS" />
    <application android:icon="@drawable/icon">
        <activity android:name=".SMSSenderActivity"
android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

-Devesh

--~--~---------~--~----~------------~-------~--~----~



Send SMS from one emulator instance to another

by Megha Joshi » Sat, 30 Aug 2008 02:39:04 GMT


 Please reference the SMSTest sample app uploaded in the Files section. It
shows how to send SMS between two emulators using SMSManager APIs:


Sponsored Links


Other Threads

1. What is ment by INTEGRATED browser?

HI,
I am struck at one concept. What is the meaning of integrated browser?
and can i replace my own developed browser on android?

and should all browsers that run on android should be developed by
using Webkit?

what exactly webkit is?

--

2. Search Widget: Add own engine

Hi,

just did not find the right terms for a proper Google search for this.

What are the Keywords, that I have to use to get some documentation,
if I want to add an own search engine behind the default search bar?
Or just the link ;)

Contacts are added, app names, maybe content of SMS,... How do I add
my own?
(not configuration; I want to implement something, e.g. as deliverable
app)

Best regards,
Flo

--

3. CONTEXT_LOST GLSurfaceView

4. V4L2:"/dev/video0" is not generated when USB Camera is connected

5. Timestamp headers on Sent E-mail - Diferent Languages [BUG]

6. Contacts SyncAdapter issues

7. Building test cases from source code.