如何获得用户家庭/工作地点在Android的用户用户、如何获得、地点、家庭

2023-09-04 04:38:59 作者:芭芭说名字长点才会被注意

即时通讯开发一个应用程序,使用户的信息项目的快速列​​表,但我希望让他接收到这个项目的通知时,他离开家庭或工作设置一个选项。

Im developing an app that brings the user a quick list of "info" items but i want to set an options so that he receives this items as notifications when he is leaving home or work.

我注意到(使用谷歌现在我的设备上),他们可以告诉了用户生活和工作,使他们可以把你推通知当您离开或在此位置之一到货(一种,如果这样那么)。

I noticed (using google now on my device) that they can tell where the user lives and works so that they can push you notifications whenever you leave or arrive at one of this places (a sort of if this then that).

有什么办法哟获得坐标(纬度和长),谷歌现在(他们来自谷歌地图)使用这个?我的意思是这样(GoogleMapsApi> GetFavorite位置>回家位置>找坐标>使用他们在我的应用程序)。

Is there any way yo obtain the coordinates (lat and long) that Google Now (they come from google maps) uses for this?. I mean something like (GoogleMapsApi > GetFavorite Locations > Get Home Location > Get coordinates > use them in my app).

如果有,你可以点我一个例子,教程,或code,这是否。

If there is, can you point me to an example, tutorial, or code that does this.

在此先感谢。

推荐答案

我不认为你可以从谷歌API的信息。正如@ surender8388在评论中提到,只有这样才能在使用地点和时间做出来。

I don't think you can get the information from Google APIs. As @surender8388 mentions in the comments, the only way to make it out is using location and time.

ACCESS_COARSE_LOCATION是,如果你不想使用GPS一个不错的选择。

ACCESS_COARSE_LOCATION is a good choice if you don't want to use GPS.

 
精彩推荐