android获取设备唯一识别码
1.添加plyer依赖,它是对各平台接口的python封装。
requirements=plyer
2.获取唯一识别码
import plyer
uid = plyer.uniqueid.id
ios获取设备唯一识别码
1.去kivy-ios目录编译plyer,并更新你的项目:
./toolchain.py build plyer
./toolchain.py update ~/myapp-ios
2.获取唯一识别码
import plyer
uid = plyer.uniqueid.id
3.运行程序时可能会遇到NotImplament错误,请下载相关文件并替换plyer中相应文件【0】:
kivy-ios/dist/root/python/lib/python2.7/site-packages/plyer/ios/uniqueid.pyo