Skip to content

Commit 7b0690a

Browse files
authored
fix: allow using existing session token(String) in place autocomplete (#722)
* fix: add session token constructor to place autocomplete * Update comment
1 parent 1ff58c6 commit 7b0690a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/main/java/com/google/maps/PlaceAutocompleteRequest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ public SessionToken(UUID uuid) {
6767
this.uuid = uuid;
6868
}
6969

70+
/**
71+
* Construct a session that is a continuation of a previous session.
72+
*
73+
* @param token The unique String to be used as the seed for the session identifier.
74+
*/
75+
public SessionToken(String token) {
76+
this.uuid = UUID.nameUUIDFromBytes(token.getBytes());
77+
}
78+
7079
/**
7180
* Retrieve the universally unique identifier for this session. This enables you to recreate the
7281
* session token in a later context.

0 commit comments

Comments
 (0)