0

I have a temperature converter app that is on the first screen (activity) and once this is converted using a calculate button, there is a button to take you onto the next screen(activity). then on this screen there is going to be a button which will send a text to someone that shall include the temperature that has been entered on the first screen in both celsius and fahrenheit inside a message such as "the temperature of 5 degrees celsius is 41 degrees in fahrenheit".

How would I go about getting the message to use data entered on the previous screen and then actually to send it to someone in this sort of message form?

thanks

Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
  • 4
    Why? What's the purpose of sending it as a text? Assuming you're not just trying to put it in a copy/pastable form (for which there are other methods), from what number would you pretend the text comes? – CPerkins Apr 22 '13 at 14:26
  • Assuming you still want to do it, I don't know why you would but here is how i would go about doing it : Well first pass the data entered in the first screen as extra data along with the intent and then on the button press you should pick up the device phone number using Telephony class, & then implement SMS code for sending a SMS to that number – Adnan Mulla Apr 22 '13 at 14:29
  • I have no idea why I put own phone in there, I shall edit it now. – user2307582 Apr 22 '13 at 14:30
  • I don't understand how to pass the data entered in the first screen accross – user2307582 Apr 22 '13 at 14:31
  • Fetch the data and pass it along as extras with the Intent. – Adnan Mulla Apr 22 '13 at 14:32
  • [Sending SMS](http://stackoverflow.com/questions/4967448/send-sms-in-android) and [Passing data between activities](http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android) – FoamyGuy Apr 22 '13 at 14:36
  • See: http://stackoverflow.com/questions/4233873/how-to-get-extra-data-from-intent-in-android – MarsAtomic Apr 22 '13 at 16:55

0 Answers0