简体   繁体   English

Android中的UUID是否特定于设备中的应用程序?

[英]Are UUID's in Android specific to application within the device?

looking in the the web for answers, I am sort of confused id UUID's are unique to a service within the device. 在网上寻找答案,我感到困惑,ID UUID对于设备内的服务是唯一的。 I want to know if an application on a particular device can generate a UUID during installation which will be same in all the other devices where the app is installed? 我想知道特定设备上的应用程序是否可以在安装过程中生成UUID,而该UUID在安装该应用程序的所有其他设备中是否都相同?

so that a search can be performed using UUID to find how many devices are using this particular application using bluetooth. 以便可以使用UUID进行搜索,以找到有多少设备正在通过蓝牙使用此特定应用程序。 or is there any other way to do that using UUID.( like fetchUuidsWithSdp ()) 还是有其他方法可以使用UUID做到这一点。(例如fetchUuidsWithSdp())

I am new to Android programming. 我是Android编程的新手。 so be kind if I am being Naive.. 如果我天真,请保持友善。

UUIDs are generated as random numbers or other algorithm intended to guarantee that no UUID is ever generated twice. UUID生成为随机数或其他算法,以确保两次都不会生成UUID。

If you want multiple instances of an application to use the same UUID, you'll have to generate it in advance and include it in your application. 如果您希望一个应用程序的多个实例使用相同的UUID,则必须提前生成并将其包含在您的应用程序中。

There's no reason why you can't do this, and a web search for "UUID generator" will turn up several sites that will provide you with one. 没有理由您无法执行此操作,并且在网络上搜索“ UUID生成器”将打开几个可以为您提供站点的站点。

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

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