开发者

How to uniquely identify a downloaded Java ME app [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

A unique identifier for cell phone other tha开发者_如何学运维n IMEI or IMSI?

I have the following problem: I want to offer a Java ME app for download, which can obviously be installed on a mobile phone (different manufacturers and models) and will afterwards - when used - communicate with a web server. During this communication I need to uniquely identify the app (i.e. the phone/user) but preferably without bothering the user to enter a username/password or something.

My first attempt was too use the phone's IMEI, but it's a pain in the a** to retrieve the IMEI from a phone using JavaME and for some phones it does not seem to be possible at all. At least I couldn't find a way to guarantee that the app will transmit a correct IMEI for every phone. Please, anyone correct me if I'm wrong.

Second idea was too encode an ID into the app before it is downloaded. Is there a standard/preferred way to do this (besides adding the ID to the .jad file)? Any hints would be appreciated.

Thanks in advance.


How about using the System.currentTimeMillis() at the first time the user fires up the MIDlet? The chances of this being identical for two users are slim-to-none ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜