Is it possible to find to which port was the SMS sent(as I understand getOriginatingAddress returns only number)?
How can I send SMS to a specific port from emulator?
The main problem is that port number and phone number which emulator has are the same.
My quick guide if you wanna check how to send sms among devices: http://xjaphx.wordpress.com/2011/07/07/sending-messages-among-devices/
Launch another instance of emulator. The port number is displayed in the window title.
To send SMS to custom port use this method.
Related
I want to send test SMS messages from my PC via adb, to the phone. Is this possible? I've seen scripts to automate sending SMS from the phone, but I want to simulate SMS messages to the phone. I was able to do this via the emulator by telneting to it. Is there something I can do with a real phone (Galaxy Nexus). I do'nt have the development phone hooked up to phone service; I want this to be directly from the comptuer to the phone.
You could develop a small application that receives an Intent and which is capable of sending an SMS accordingly to the received data.
You need to declare a custom <intent-filer> in your AndroidManifest.xml and bind a BroadcastReceiver on that Intent. So you will be advertised everytime an Application issues this Intent.
On the other side, use the command line to send intents to your VMs using :
adb shell am start -a broadcast com.messenger.sms.send -e message my_message
In the BroadcastReceiver, the extra data will be accessible through a call to :
intent.getExtras().getString("message");
You can also find here more thorough examples on what you can do using am.
Do you have another cell phone with actual service?
If only a rough simulation is what you're looking for, I'd suggest you set up a Google Voice account to receive texts from a Google Voice number via wifi, or just use something like MightyText to synchronize the sms messages/notifications from your activated phone with your deactivated development phone (over wifi).
I assume that MightyText will probably be the easiest and quickest to set up between the two.
Is it possible to send SMS from Android emulator to a mobile phone via a GSM modem connected to a USB port of computer ? If it is possible how can I do that
Thanks in advance!
You could do that but android won't detect it as a native antena, in other word, all functions from android to send sms or initiate a call won't work.
If the device is visible is /dev/.. You could be able to open it and send command trough serial. Unless someone wrote a driver so android can load it for gsm communication inside the emulator, my guess is that it's pretty useless.
Anyway, the emulator does have a way to test sms sending as far as I can remember, and if you really want to send sms trough your gsm dongle, It's probably a better idea to start writing a script using python for example. There is also a library that enable sms sending from linux, it might also work on other platforms.
Sending sms from python from computer:
http://designbuildtestrepeat.wordpress.com/2008/06/26/sms-over-3g-and-bluetooth-from-python/
Checking incoming sms for emulator android:
http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/
Sending sms between emulators:
http://xjaphx.wordpress.com/2011/07/07/sending-messages-among-devices/
And then it really depends on what you need. You didn't exactly said why you wanted to do that. You didn't say if you wanted to test sms messaging or wanted to send actual sms from computer. It's not really clear why you need android and the gsm modem at the same time.
I am creating an android application which gets the phones location, Latitude and Longitude, and time and sends it to a central database at regular intervals. The problem is I am using SMS to send this data and I am having trouble figuring out where to send it. The first thing which came to my mind is a computer which stores all this data and reads it then carries out an action based on the data, in this case it maps it.
So is it possible to send a SMS to a computer? Or should I try out a different method to send the data?
Any suggestions would be helpful. Thanks! :)
EDIT
I understand it is possible to connect my phone to the computer and then transfer the SMSs but I actually just have 1 phone right now and I cant have it always hooked up to the computer.
Euhm SMS? I dont think that is possible.
Try to use JSON.
https://www.google.nl/search?sugexp=chrome,mod=18&sourceid=chrome&ie=UTF-8&q=Send+data+to+server+android+json
You can connect you phone to your computer as SMS modem and get its SMS from your phone. Almost phone can do this. But the most common way is that integrated with a web service.
While it is possible to send sms to a computer if that computer has a GSM module (or mobile phone connected as modem) you should rather consider a different method.
I'd go with sending emails or - if you are willing to - create an AppEngine Project to receive the data.
If the application using sms-sending and receiving how is it possible to test it within the emulator?
It is so simple first start the emulator and launch your application.
now if you have another project(any) launch this in another emulator.
On the other emulator start sms application and send sms to the emulator in which your app is running.The phone no. is simply the emulator number like 5556 or 5554.
Edit
Now You can send an SMS or make a call using Emulator Control. In Eclipse go to window->show views->other->Emulator control.
Now we can use emulator's extended control to send directly to the emulator.
Open Extended controls window.
Open Phone tab
Enter message and send
Check this for Sending SMS to the Emulator using Port.
Sending SMS for Emulators...
You might want to refer to one of my article on handling Emulator SMS: http://xjaphx.wordpress.com/2011/07/07/sending-messages-among-devices/
i am developing android messaging application i need to know port number of emulator to test my application by sending SMS to that emulator where can i find port number?i am new to android
Use:
adb emu sms send 5551234 "text"
to send sms to emulator.
You can use the DDMS perspective in Eclipse to send an SMS to your emulator as well.
By default the window to send an SMS is on the left side of the screen in the middle.
Be sure to select your emulator in the window above if it is not already selected.