简体   繁体   中英

Send message to a server from android device without internet connection

Basically I want to create an application on Android device which able to send a message to my third-party server without being connected to internet through wi-fi or 3G service. Is there anyway to achieve this?

Sure, if by 'message' you mean text message/SMS or phone call. You could setup a server to send and respond to SMS messages, but that's not exactly trivial.

Some years ago I played around with remotely setting a TV recording on my PC-based PVR using SMS.

My phone provider had an SMS to email gateway service that allowed me to send an SMS message in the format someone@somewhere.com subject message .

My email provider allowed me multiple POP3 addresses so I set one up for pvr@mydomain.com and I could send a message to it using 'Do record' as subject and a message body of something like...

4 20100109 1900 2000

...which meant record channel 4 from 7pm to 8pm on the 9th Jan 2010.

I wrote some code on my server to check the POP3 account for pvr@mydomain.com every 5 minutes and check for any messages with the subject 'Do record'. If it found any, it downloaded the full message and processed the body.

Google for RFC 1939 which explains the POP3 protocol.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM