xamarin .forms 手机的一些信息获取Device Info Plugin
来源:互联网 发布:淘宝基础版店铺装修 编辑:程序博客网 时间:2024/06/03 14:26
API的使用
调用 CrossDeviceInfo.Current 从任何项目或PCL访问api。
GenerateAppId 用于为应用程序生成一个惟一的Id。
/// <summary>/// Generates a an AppId optionally using the PhoneId a prefix and a suffix and a Guid to ensure uniqueness/// /// The AppId format is as follows {prefix}guid{phoneid}{suffix}, where parts in {} are optional./// </summary>/// <param name="usingPhoneId">Setting this to true adds the device specific id to the AppId (remember to give the app the correct permissions)</param>/// <param name="prefix">Sets the prefix of the AppId</param>/// <param name="suffix">Sets the suffix of the AppId</param>/// <returns></returns>string GenerateAppId(bool usingPhoneId = false, string prefix = null, string suffix = null);
ID
/// <summary>/// This is the device specific Id (remember the correct permissions in your app to use this)/// </summary>string Id { get; }
重要的是:
Windows Phone: 权限添加: ID_CAP_IDENTITY_DEVICE
设备模型
/// <summary>/// Get the model of the device/// </summary>string Model { get; }
版本
/// <summary>/// Get the version of the Operating System/// </summary>string Version { get; }
返回特定的操作系统版本号的如:
- iOS:8.1
- Android:4.4.4
- Windows Phone:8.10.14219.0
- WinRT:总是8.1,直到有一个工作
平台
/// <summary>/// Get the platform of the device/// </summary>Platform Platform { get; }
返回平台枚举:
public enum Platform{ Android, iOS, WindowsPhone, Windows}
dll下载地址
http://components.xamarin.com/view/DeviceInfoPlugin
- 另外推荐168vpn,很多开发更新时候必备,交流qq470138890
0 0
- xamarin .forms 手机的一些信息获取Device Info Plugin
- xamarin.forms Geolocator Plugin 地理位置的获取
- Xamarin.Forms 获取设备的ip地址
- xamarin.forms 检测运动传感器值变化:加速度计、陀螺仪、磁强计、指南针。Device Motion Plugin
- 获取手机的一些信息
- cordova-plugin-device 获取设备信息整理
- xamarin.forms 联网状态检测,Connectivity Plugin
- xamarin.forms Settings Plugin 设置插件
- xamarin.forms Vibrate Plugin震动操作
- Xamarin.Forms 获取当前版本号
- Xamarin.Forms 获取IP地址
- 获取手机的内存的一些信息
- xamarin.forms 文件的一些操作,统一代码
- android的一些常用手机信息获取
- android的一些常用手机信息获取
- android 获取手机的一些硬件信息
- TelephonyManager获取到手机的一些信息
- android的一些常用手机信息获取
- UUID
- 查询sql
- 使用Search查询Office 365 Groups
- 关于laravel错误解决方案
- 读取到配置文件的C语言的接口实现
- xamarin .forms 手机的一些信息获取Device Info Plugin
- ConcurrentHashMap源码解读
- Leetcode: Count and Say
- 可以返回执行结果的system函数加强版本
- hdu 5179
- unity3D中Socket链接与服务之间的通讯测试程序
- 组播,单播,广播,多播,泛洪的基本概念
- 程序员的自我修养
- 微信平台开发——日历服务