Back to project page LibreText-to-PC.
The source code is released under:
GNU General Public License
If you think the Android project LibreText-to-PC listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package matxorapps.com.libretext_to_pc; /*from ww w. ja v a 2s . c o m*/ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import android.util.Log; import android.widget.Toast; /** * Created by Mostsb on 21/01/2015. */ public class SMSReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent){ Bundle pudsBundle = intent.getExtras(); Object[] pdus = (Object[]) pudsBundle.get("pdus"); SmsMessage messages = SmsMessage.createFromPdu((byte[]) pdus[0]); SMSService.pushSMS(messages.getMessageBody(),messages.getOriginatingAddress()); } }