简体   繁体   English

AIR应用程序中的用户ID

[英]User ID in AIR application

is it possible to use a sort of 'user id' inside an AIR application? 是否可以在AIR应用程序中使用某种“用户ID”? In my app every user can create and save pictures, but I need the possibility to exchange pictures between users. 在我的应用程序中,每个用户都可以创建和保存图片,但是我需要在用户之间交换图片的可能性。 So, every pictures need to have, in the name, some code related to the user that creates the image (like xxxx_1.jpg, xxx_2.jpg where xxx is the user id). 因此,每张图片的名称都必须包含一些与创建图像的用户相关的代码(例如xxxx_1.jpg,xxx_2.jpg,其中xxx是用户ID)。

My AIR app is for iOS and Android 我的AIR应用程序适用于iOS和Android

Any idea??? 任何想法???

Massimo 马西莫

Will be necessary to get the device ID and save as key for your user database table. 获取设备ID并将其另存为用户数据库表的键将是必需的。 So, you can use the 'userDeviceID'_1.jpg, 'userDeviceID'_2.jpg… 因此,您可以使用'userDeviceID'_1.jpg,'userDeviceID'_2.jpg ...

You can try this native extension (works fine for iOS and Android) to get the device ID. 您可以尝试使用本机扩展 (在iOS和Android上正常工作)来获取设备ID。

Based on Josh Janusch's comment 'Apple has removed the UDID API from iOS 7', so, try to follow this tutorial I'm going to test it to be sure that really works. 基于Josh Janusch的评论“ Apple已从iOS 7中删除UDID API”,因此,请尝试按照本教程进行测试,以确保它确实有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM