| Author |
Message |
bjreddi Junior Developer
Joined: 03 Apr 2008 Posts: 17
|
Posted: Fri Apr 25, 2008 12:07 pm Post subject: Re: Recognize/React on incoming SMS: HELP |
|
|
Plusminus,
Thank you very much in tutoring us with very good applications.
I have tried the example that u have posted. "Rect on incoming SMS"
I have two Java classes SMSActivity.java, SMSReceiver.Java. I just copied and ur code and ran the application.
I got this note when i ran the application:
"Helloworld, SMSActivity"
I didnt get any SMS received notification.
I did the way u mentioned in the tutorial.
I have no errors at all. But how to get the Notification. Please help me.
Regards,
Jyothi |
|
| Back to top |
|
 |
kiran Experienced Developer

Joined: 22 Nov 2007 Posts: 71 Location: India
|
Posted: Fri Apr 25, 2008 12:18 pm Post subject: |
|
|
Hi,
use the emulator control in ddms to send a SMS message to your emulator. The message will be displayed automatically.
Regards,
Kiran. _________________
smile it is the key that fits the lock of everybody's heart |
|
| Back to top |
|
 |
bjreddi Junior Developer
Joined: 03 Apr 2008 Posts: 17
|
Posted: Fri Apr 25, 2008 12:21 pm Post subject: |
|
|
Hi Kiran,
I am just a beginner, I really dont know how to use this DDMS from Emulator,.
Could please guide me.
Thanks n Regards,
Jyothi |
|
| Back to top |
|
 |
kiran Experienced Developer

Joined: 22 Nov 2007 Posts: 71 Location: India
|
Posted: Fri Apr 25, 2008 12:41 pm Post subject: |
|
|
Hi,
If you are using eclipse with ADT plugin then you should have DDMS perspective in your eclipse. On Opening DDMS perspective, to the left of the screen you will have the Emulator control view along with processes. You can also run ddms.bat file in tools folder.
Regards,
Kiran. _________________
smile it is the key that fits the lock of everybody's heart |
|
| Back to top |
|
 |
kiran Experienced Developer

Joined: 22 Nov 2007 Posts: 71 Location: India
|
|
| Back to top |
|
 |
bjreddi Junior Developer
Joined: 03 Apr 2008 Posts: 17
|
Posted: Fri Apr 25, 2008 12:58 pm Post subject: |
|
|
Hi Kiran,
Thank you so much.
Yes, I checked the Push and Pull from/to files to emulator.
And this time i clicked on Devices,, where i was able to my application and click on it. and again clicked on Emulator controler then it enables the all fields.
Great!! thanks once more,.
Regards,
Jyothi |
|
| Back to top |
|
 |
dkkundudolan Junior Developer
Joined: 03 Mar 2008 Posts: 12
|
Posted: Sun Apr 27, 2008 7:40 am Post subject: |
|
|
Hi Sebi,
I have a problem that , when I am sending request to the server, server is sending reply to me with all the details. i can see the reply at that time itself when server is sending to me. But i want to see the message whenever i want.
please , can you tell me how can i see the incoming message from server at any time?
is there any related code with that? plz reply me fast. I had gone through the following code:
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.Resources;
import android.os.Bundle;
import android.os.Message;
;
import android.provider.Telephony.Sms;
import android.view.View;
import android.view.ViewInflate;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
public class MatchingStuff extends Activity{
// private final Toast mToast;
private String textMessage="";
private TextView Text;
private Mstuff mstuff;
// private final Toast t;
private ViewInflate inflate = null;
@Override
public void onCreate(Bundle icicle){
super.onCreate(icicle);
setContentView(R.layout.matchingstuff);
TextView serverreptext = (TextView) findViewById(R.id.serverrep);
Bundle bundle = this.getIntent().getExtras();
String s = bundle.getString("ServerReply");
serverreptext.setText(s);
Button button = (Button) findViewById(R.id.notify);
button.setOnClickListener(new Button.OnClickListener() {
public void onClick(View arg0) {
showToast();
showNotification(mstuff);
}
private void showNotification(Mstuff mstuff) {
}
private void showToast() {
View view = inflateView(R.layout.matchingstuff_message);
TextView tv = (TextView)view.findViewById(R.id.message);
tv.setText("HttpClient");
Toast t = new Toast(mstuff);
t.setView(view);
t.setDuration(Toast.LENGTH_LONG);
t.show();
}
private View inflateView(int matchingstuff) {
ViewInflate v = (ViewInflate)getSystemService(Context.INFLATE_SERVICE);
return v.inflate(R.layout.catalog, null, null);
}
private void showNotification() {
NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
String from = "Match found";
Intent contentIntent = new Intent(MatchingStuff.this, Settings.class);
// Intent contentIntent = new Intent();
String text = getString(R.string.matchingstuff_text);
Intent appIntent = new Intent(Intent.VIEW_ACTION, Sms.Inbox.CONTENT_URI);
//Intent appIntent = new Intent();
Notification notif = new Notification(
MatchingStuff.this,
R.drawable.stat_sample,
text,
System.currentTimeMillis(),
from,
textMessage,
contentIntent,
R.drawable.shadow,
getText(R.string.activity_sample_code),
appIntent);
nm.notify(R.string.matchingstuff_text, notif);
}
});
}
} |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
© 2007, Android Development Community
All rights reserved.
Powered by phpBB.
|