Created
September 10, 2020 15:16
-
-
Save tugcearar/a7d7c0ba83942c2e7e6c6fa6f2e78a7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NearbySearchResultListener : Java.Lang.Object, ISearchResultListener | |
{ | |
private MainActivity context; | |
public NearbySearchResultListener(MainActivity context) | |
{ | |
this.context = context; | |
} | |
public void OnSearchError(SearchStatus status) | |
{ | |
Toast.MakeText(context, "Error Code: " + status.ErrorCode + " Error Message: " + status.ErrorMessage, ToastLength.Long); | |
} | |
public void OnSearchResult(Java.Lang.Object results) | |
{ | |
NearbySearchResponse nearbySearchResponse = (NearbySearchResponse)results; | |
if (nearbySearchResponse != null && nearbySearchResponse.TotalCount > 0) | |
context.SetSearchResultOnMap(nearbySearchResponse.Sites); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment