AnsweredAssumed Answered

TPSDK - Keeping User Login Refreshed

Question asked by Charles Bisbee on Jun 29, 2020
Latest reply on Jul 1, 2020 by Nico Becke

Good morning!

 

I have a question regarding what the responsibility is of a 3rd party app implementing the TPSDK for Catalyst is when it comes to refreshing a user's Trimble login? Reading through the documentation I am a little unclear about how often I need to call the "com.trimble.tmm.LOGIN" intent and when, if ever, I need to call the "com.trimble.tmm.RefreshUserToken" intent.

 

For example, I know that in order to use the TPSDK I need to call the Login intent which will return the user's Trimble ID from TMM which I can then use to instantiate a driver manager object, load drivers, etc. I also know that if the user logs out of their account in TMM or switches users then there will be issues when trying to use the TPSDK and our application will detect this and prompt the user to launch TMM to get the updated Trimble ID or log back into TMM. My main question is there a time in between these two instances when our app should be launching TMM to refresh the user's login? For example, if a user has launched TMM and we have pulled in the Trimble ID and then the user uses our app for several weeks is there a certain time when out application should launch the Login intent again just to keep things refreshed? Also, what is the role of the "RefreshUserToken" intent? I have read through the docs for the TPSDK and it's a bit unclear to me why and when this intent should be used.

 

Last note, I know the documentation for the TPSDK mentions that there's no harm in launching the Login intent as often as possible but I have found that even when the user is already logged into TMM and the Login intent is launched there is some screen flickering in the UI that I would definitely prefer to avoid. That's my main reason for trying to pin down how I can minimize the amount of times I launch the login intent while also making sure that my application is doing it's job to keep everything refreshed and up to date.

 

Thanks!

Outcomes