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?
Your submit button's onClick handler needs to do something like this:
Go through all relevant views in your activity and fetch the current values.
Create a text string from the values.
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.
Related
I have an Android App in which I need to implement auto-read and auto-fill of OTP (via SMS). The main work in the app is done by a Web application which the App calls via WebView.
I have been able to read the OTP value which is received by SMS (by implementing SMS Receiver, SMS Listener etc as explained in other stackoverflow articles)
I now need to autofill the parsed OTP into the OTP Text box.
This is the (WebView)page where I enter the mobile number to receive the OTP
When I click on Generate OTP this dialog pops up:
Modal Dialog to input OTP
I need to autofill the OTP Text field and autoclick on the submit button, so that my Web Application can validate the OTP. How can I do this?
I just have one approach but If someone already did this then please let me know your approach.
Read the SMS from native app code then expose to web view so that JavaScript can read from window object. You can create a waiting function in JavaScript to read a globally exposed variable from App bridge. Once to get some valid value fill it in the otp text box and clear the value in the global variable.
We're doing an app, where the user can send a MMS, and we would like to be able to extract the phone number from the current SMS/MMS (if one is open) and reapply it, so we don't delete the recipient when inserting the image...
So is there any way for us to access this info, so we can set it with:
picMessageIntent.putExtra("address", new String("here we want the number"));
I have designed an application that will send an email to all addresses in an sqlite database to check their availability.
Is there any way that the people receiving these emails can reply with a yes/no and the app would listen and take in what the reply was?
If this is not possible for email, can it be done with a yes/no text message?
Thanks in advance.
The replies could certainly be sent as a response to your message and end up in the mailbox corresponding to the sender of your message. Your app could monitor that mailbox for new messages and process them.
You can't use JS in an email, and forms have spotty support (more info). You can instead use href links with unique urls to respond to a single question.
See here for an example.
I have developed an android application which now I want to extend so as it can send text messages.
Most probably I will be able to find documentation on how to send a text message, but what I am looking for is something I don't know how to do a research on it.
There are two types of text messages you can receive.
One type is from a contact you already know, hence you will see the contact name.
Second type is from a contact you don't know. And, depending on the contact, you will either see a mobile number or a name (eg Google).
My goal is to extend my android application to send a text message in a way that the recipient will see a name as sender (eg Google) and not a mobile number.
I cannot extend my application to use 3G to communicate with a server and send the sms through the server nor I can use an online service which is going to send the sms.
I have to either send the text message from the android application directly or send an sms to an sms service to forward the text message to the recipient.
Is this possible to do?
I have an application on first user's phone which sends a sms to second user.I am abled to send the sms to second user but I want to have a button which can show me the received sms.
Right now I'm having a code from a tutorial http://mobiforge.com/developing/story/sms-messaging-android but it shows the sms immediately after it is received on second user.I want that it is shown only when some particular button like "View sms" is clicked.How can I do it? Any ideas please.
Here is the link of code:
http://pastebin.com/Hu317WNd
You will have to store the message in memory/db/file somewhere and then when the user hits the button you open the file/sql whatever and display the 1st message on the stack.
Listen for button click, get latest message, display.
Can you give some tutorial links for this or some piece of code it'll
be easy then. And one more thing,when that message is retrieved from
file can we have a reply option so that user can reply back to it? If
yes, please explain how? Or tell me how can I change the above
requirement to this one?
I can post some links and you can put them together
Button Click listener Right at the top
Reading and writing to a file This probably isn't the best way, but you could have a comma delimited file that stores the messages that are waiting to get replied to.
The best way would be a database, but since it seems your a beginner start with a file or maybe even shared preferences.
When you read the message in from the file or the db you should have the telephone # data and you can have a reply button present when you display the message.
Going with the tutorial you send, just store the message when it is received in the broadcast listener.