如何在靠近预定义位置时从 Android 发送短信 (SMS)
当靠近预定义位置时从 Android 发送短信 (SMS)...
例如。当我进入大学或离开大学时,我的 Android 设备会检查我当前的位置是否与预定义位置匹配,然后我的设备会自动向其他号码发送短信。
任何朋友有与此相关的想法或代码..
谢谢..
Send Text Messages (SMS) From Android When Near A Predefined Location...
Ex. i enter in the college or out from the college that time my Android device check my current position if it match with predefine position then my device send automatic sms to other no.
Any buddy have idea or code related to this ..
thank you..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我把完整的代码从我的短信实用程序。您应该看看 sendSms 函数。该实用程序允许您监视传入的短信并跟踪您发送的短信(如果您想这样做)。
下一部分是处理位置更新。最好的方法取决于很多因素。您可以通过 LocatinProviders(GPS、无线或被动)获取位置或从 TelephonyManager 读取手机信息。下面是有关它们的一些详细信息:
LocationProvider:
细胞。
哪种选择更适合您?
I put whole code from my SMS util. You should have a look at sendSms function. The util allows you to watch for incoming sms and track sms sent by you ( If you want to do that ).
The next part is to handle location updates. The best way how to do it depends on many things. You can obtain location via LocatinProviders ( GPS, wireless or passive ) or read cell info from TelephonyManager. Below you have some details about them:
LocationProvider:
Cells.
Which option is better for you ?