How do I generate a unique ID from web/javascript and then generate same unique ID in android App?

188 views Asked by At

Hi I would like to generate a unique ID from web/Javascript and also be able to generate the same unique ID in app without the two communicating. I will not be using PhoneGap just pure javascript or probably a light library.

I was initially planning to use the device ID but its not accessible from JavaScipt without using PhoneGap. There are many ways I know how to generate a unique ID from native Android app but I'd like to be able to generate the same one from the Web/JavaScipt.

Any help is appreciated thanks so much.

1

There are 1 answers

0
Vikasdeep Singh On

Unique ID Suppose to be Generated Only Once.

Now come to your question:

How do I generate a unique ID from web/javascript and then generate same unique ID in android App?

You can not generate the same ID from two different places i.e. from Android Native and JavaScript/Web. Please keep in mind, not possible.

Note : If you are able to generate the same ID again then that ID is not unique at all.