发送短信,并与本地短信应用

问题描述:

我在我的应用程序中使用,发送的安卓应用SMS的确认,我想有当发送消息的回报:发送短信,并与本地短信应用

sms activity

Onresult methode

我的代码:

ActivityResult回报nothink,我不明白。我只想知道何时按下发送按钮或发送消息时。 :)

+1

请不要发布的代码截图。只需将代码添加到您的问题。 – Markus

短信意图不返回结果,你必须使用SMS广播接收机对于这一点,以下是该所要求的权限和广播接收器..

<uses-permission android:name="android.permission.RECEIVE_SMS"/> 



<receiver android:name=".SmsIntentReceiver"> 
     <intent-filter android:priority="1"> 
      <action android:name="android.provider.Telephony.SMS_RECEIVED" /> 
     </intent-filter> 
    </receiver> 
+0

好的谢谢你的回答,你有没有网站或例子来实现这个广播接收器?我发现这个:http://www.tutos-android.com/broadcast-receiver-android –

+0

该教程是正确的,你可以按照这个。 –