1

i have been doing a lot of research these couple of days and i have not found a good solution to this problem. You see i'm trying to add a feature to my project, that would enable users to send an SMS using the native SMS app. The SMS would be something like check 1001 i would then parse the message for the code and search the database for that id, if the id was found it would send back an SMS to the emulator user found otherwise user not found.

These are the links that i've read. send and receive sms using android emulator then sending sms messages in android also this send message to Wailon server .This does not seem to be a typical server.

The closest i have been to a solution is Envaya sms , but after installing and trying it out, i bumped into a problem reading through their documentation i realized it's more than 5 years old and is no longer maintained. This is obviously not an ideal start.
Is it possiblie to do this on the emulator. I'm using Android Studio by the way.
Edit: To summarize.

  1. I have a laravel website im developing on localhost:8000/
  2. I am running an android emulator via android studio in my linux machine.
  3. Would like to open the emulator and send an sms that would get to the website at localhost.
  4. After processing
  5. Send back a message from the website at localhost to the emulator to be received as an sms.
Community
  • 1
  • 1
Bantu
  • 585
  • 5
  • 12

1 Answers1

0

Emulate SMS

Ctrl+Shift+P ⌘⇧P

To send a text message to the emulator:

Select or type a phone number in the From field. Type a message in the SMS message field. Click Send Message.

Emanuel
  • 8,027
  • 2
  • 37
  • 56
  • Thank you but i already know how to do this, i want to send it to the test server at localhost. – Bantu Feb 11 '17 at 12:36
  • As writte in IRC. If you want to verificate the number using SMS you should let the user insert the Phone Number. The Client sends a request using (for example) REST to the server which returns a verification pin. The Device itself sends a sms to the number assigned by the user with the pin received from the server. If you receive a SMS and the code in the sms matches the code received from the server then you send the "verified" handshake back to the server. (In your case its not a number, its a pin, but same concept) – Emanuel Feb 11 '17 at 12:43
  • okay let me explain the whole scenario of how i want it to play out maybe we will be on the same page. I would have officials using the application to collect information from the public and they would go door to door asking questions like a questionnaire, now each official has an identification card with an identification number, so to prevent robbers or other malicious people from claiming to collect information. I want the public to verify that Identification number exitsts by sending an sms or shortcode with the ID number to the server where they would get a message back. – Bantu Feb 11 '17 at 13:09
  • To further explain myself, i want to be able to do something like this http://kplc.co.ke/content/item/788/jua-for-sure – Bantu Feb 11 '17 at 13:42
  • For this case, if you really want to avoid using REST you need a sms listener on the serverside. Since you use laravel you should look at nexmo which provides a sms gateway. – Emanuel Feb 11 '17 at 13:46
  • I cant use this because the sms gateway needs a publicly accessible website mine is on localhost, but thank you i have learnt a lot from this. – Bantu Feb 11 '17 at 20:28
  • You can serve laravel on any network adapter you want using php artisan serve --host. Even in a secure intranet – Emanuel Feb 11 '17 at 21:55
  • Hey why dont we move this conversation somewhere else and if we come up with a solution we can post it here. – Bantu Feb 12 '17 at 05:40
  • email me elvimashis@gmail.com when you are free ill make myself available on IRC. – Bantu Feb 12 '17 at 13:27