gpt4 book ai didi

android - 如何在 Xamarin 中获取 GoogleApiClient?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:26:31 24 4
gpt4 key购买 nike

我想实现类似 this 的东西在我用 Xamarin 开发的 Android 应用程序中,找不到 GoogleApiClient 所在的命名空间。有人可以帮忙吗?

最佳答案

GoogleApiClient 位于 Android.Gms.Common.Apis 命名空间中。

该命名空间位于“Xamarin.GooglePlayServices.Basement”程序集中,但您不直接安装它。

因此,假设您在进行一些 Android 位置/ map 开发时尝试访问它,请安装此 nuget:

Xamarin Google Play Services - Location

Xamarin.Android Bindings for Google Play Services - Location

One of the unique features of mobile applications is location awareness. Mobile users take their devices with them everywhere, and adding location awareness to your app offers users a more contextual experience. The location APIs available in Google Play services facilitate adding location awareness to your app with automated location tracking, geofencing, and activity recognition.

To install Xamarin Google Play Services - Location, run the following command in the Package Manager Console

PM> Install-Package Xamarin.GooglePlayServices.Location

使用子句:

using Android.Gms.Common.Apis;

代码:

var foo = GoogleApiClient ();

关于android - 如何在 Xamarin 中获取 GoogleApiClient?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33391731/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com