Note that there are some explanatory texts on larger screens.

plurals
  1. POIdentifying an Android device / an installation (without physical ID)
    primarykey
    data
    text
    <p><strong>The problem:</strong></p> <p>In one of my Android apps, users should be allowed to make changes to text data on my server (via HTTP request) without being required to login or sign up.</p> <p>In order to prevent spam and abuse of this function, I would like to identify a single installation of my app so that I can "ban" this installation. Of course, the user who is abusing my service could uninstall the app and download it again or something like that. But this is truly an obstacle and makes abusing the app more difficult.</p> <p>So I have to find a way to identify an Android device or at least a single installation.</p> <p>As one can read <a href="https://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id">here</a> or <a href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html" rel="nofollow noreferrer">here</a> the physical device ID of an Android phone is not a good solution. So what else could I do to achieve this?</p> <p><strong>My idea:</strong></p> <p>When the app is started for the first time, create an (almost) unique hash (maybe SHA-512) of the current timestamp and a huge random number. Then save this value on internal storage and always use it to identify this device or installation later (on HTTP requests).</p> <p>What do you think of that solution? Are there any better approaches?</p> <p>This is almost what the <a href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html" rel="nofollow noreferrer">Android Developers Blog</a> suggest, right? But are they really writing to the internal storage? They don't use openFileOutput() as suggested <a href="http://developer.android.com/guide/topics/data/data-storage.html#filesInternal" rel="nofollow noreferrer">here</a>.</p> <p>And, at last, a question that is probably a bit stupid:</p> <p>How can I use the code shown on the Android Developers Blog? Can I add that public class to my main activity .java file?</p> <p>Thank you very much in advance! :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload