我本来是想 弄个broadcast receiver 监听短信   然后发给一个service
public void onReceive(Context context, Intent intent) {
intent.setClass(context,SendMessage.class);
context.startService(intent);
}但是不知道怎么在service中获得短信中的内容
下面是我乱写的
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
String smgBody  = null;
Bundle bundle = new Bundle();
bundle=intent.getExtras();
smgBody=bundle.getString("sms_body");
                  Log.i(TAG,smgBody);
}
但是是错误的  这样获取不到短信的内容   请教高手  谢谢