如何在离子/react中使用独立远处
我想从设备中获取Iniquededeviceid,然后使用它。我在离子/反应中添加了Angular的溶液,我找不到任何合适的溶液。 样本就是这样 首先,我安装了此内容:
$ ionic cordova plugin add cordova-plugin-uniquedeviceid
$ npm install --save @ionic-native/unique-device-id@4
然后,当我想这样使用时,我会有一个错误。
constructor(private uniqueDeviceID: UniqueDeviceID) { }
this.uniqueDeviceID.get()
.then((uuid: any) => console.log(uuid))
.catch((error: any) => console.log(error));
i want to get Uniquedeviceid from device and then use it . i fount the solution for angular by in ionic/react i didn't find any suitable solution.
the sample is like this
at first i installed this :
$ ionic cordova plugin add cordova-plugin-uniquedeviceid
$ npm install --save @ionic-native/unique-device-id@4
then when i want to use like this i have an error.
constructor(private uniqueDeviceID: UniqueDeviceID) { }
this.uniqueDeviceID.get()
.then((uuid: any) => console.log(uuid))
.catch((error: any) => console.log(error));
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,您只需要核心插件Cordova-Plugin设备,您需要调用对象设备。
Actually you just need the core plugin cordova-plugin-device and you need to call the object device.uuid in order to get the unique device id