Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Why does the GmsPlace.Instance.GetDetails(PlaceId) always hang?

$
0
0

As the title, I ran this code in different ways, and always got hanged.
In App.cs
public App (MainActivity act)
{
InitializeComponent();
GmsDirection.Init("MY_API_KEY");
GmsPlace.Init("MY_API_KEY");

            MainPage = new MainPage();
}
  1. Task.Run(async ()=>{

    var pdetails = await GmsPlace.Instance.GetDetails(gplaces[j].GPlaceId);  << hanged here.
    var geo = pdetails.Item.Geometry;  << this will not be excuted.
    

    });

  2. and also I tried this:
    var pdetails = GmsPlace.Instance.GetDetails(gplaces[j].GPlaceId);
    pdetails.Wait();<< hanged here
    var geo = pdetails.Result.Item.Geometry; << this will not be excuted.

Does anyone who has experience with GmsPlace?
(Any comments are welcome.)

My development situation:
VS 2010
TK.CustomMap 1.5.1


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>