0

I would like to have a submit button send the content of a related form directly to a phone number via SMS. However, the phone number should be private. Can the number be encoded?

4

1 に答える 1

1

Your submit button's onClick handler needs to do something like this:

  1. Go through all relevant views in your activity and fetch the current values.
  2. Create a text string from the values.
  3. Create a SMS message with the text string as its message body and send to your server.

Use android.telephony.SmsManager to send SMS messages. Be aware that your app needs special permissions to do this.

Here is a tutorial that shows how to do all of this: http://mobiforge.com/developing/story/sms-messaging-android.

于 2012-05-25T06:33:23.420 に答える