92
Views
5
Comments
Get latitude and longitude once the user login and logout
Question

Hi all,

I am building an mobile application where I need to get the latitude and longitude of an user once he login or opens an application and also same should happen once he logout. I am aware I need to use location plugin but not sure how and where to use it. 

Can anyone please help me on this.

2026-02-26 06-29-24
Rahul
 
MVP

Hi Ankita ,

Create a common action for getCureentLocation  latitude and longitude .

After that use this action after login and after logout to catch  latitude and longitude .

and save it DB or local DB.

Regards

Rahul Sahu

2017-07-15 18-41-36
Sachin Mahawar

Hi Anktia,

It is easy to get the location on Login/Logout using LocationPlugin. You can use its GetLocation action can put it on Login action of Login screen under Common flow. The same way you can put it on ClientLogout action of Userinfo block.

 


Hope it will help

Sachin

UserImage.jpg
Ankita Kulkarni

Hi Sachin and Rahul,

Thank you.

I got this part, My queries second part also says that location should be captured when I user logout.

Can you please let me know how this can be done. Is it that I need to getlocation after every timespan and keep in sync. Or any other easier way. 

Basically my idea is I need to track location the user is  from the time he login until he logout.

2026-02-26 06-29-24
Rahul
 
MVP

Hi Ankita,

See below screen shot-


Once user click on logut you can put your logic here before DoLogout.

Same you can put your logic for capture location just After DOLogin.

insert data in table with location.


Hope this will help you.

Regards

Rahul sahu

2019-03-19 12-24-07
Mariano Picco
 
MVP

If you want to track the location continuously you might want to use the WatchPosition action on the Location plug in. It will check position from time to time (you can customize how often) and fire an event with the current data. It's up to you what to do with that data. It will do this until the ClearWatch action is called. 

So what you can do is fire WatchPosition on Login, and ClearWatch on Logout:


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.