在sqlite的分贝与放大器每隔15分钟如何存储的位置信息;发送到服务器? [英] How to Store Location information every 15 minutes in sqlite db & send to Server?

查看:160
本文介绍了在sqlite的分贝与放大器每隔15分钟如何存储的位置信息;发送到服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新国际展览局为Android开发!最近我需要工作位置API为Android,其中第一个数据将存储在本地SQLite datbase在安卓本身每次15分钟和放大器;然后将其发送给服务器,以使得数据可以脱机过于进行跟踪。

I am new bie to android development! Recently i need to work Location API for android where first the data is to be stored on Local Sqlite datbase in android itself each 15 minutes & then send it to server,so that data can be tracked offline too.

任何建议,$ C C或帮助确实是AP preciated!

Any suggestions , code or help is really appreciated !!

谢谢!

推荐答案

您可以简单地创建一个后台服务则实现了一个位置监听器。在该位置监听器,你可以设置在 requestLocationUpdate 法的时间间隔来ping GPS在特定的时间间隔。或者您可以使用TimerTask的发送GPS在特定的时间间隔 这里是一个位置管理器实例:

You, can simply create a background service then implements a location listener. In that location listener, you can set the time interval in the requestLocationUpdate method to ping the GPS at particular time intervals. or you can use timertask to send gps at particular intervals Here is a location manager instance:

lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, timeinterval2, 0, locationListener);

您可以发送位置从该服务的服务器。您还可以发送通知,启动应用程序。

You can send that location to the server from the service. You can also send notifications to launch the app.

这篇关于在sqlite的分贝与放大器每隔15分钟如何存储的位置信息;发送到服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆