How would you check this?

Status
Not open for further replies.

Heaplink

Developer & Designer
Nov 9, 2011
510
173
Hello,

A friend of mine and me are sitting here and developing a "joke" app. This app is being developed both on Android (Java) and in PHP for server-side.

So the PHP is located on a server, and validates the data that is send by the Android app in form of JSON. We sort of have figured this out. Though:

You should be able to vote on each joke. But only ONE time per. person. Here the question comes in place:

How would you do this? We have thought of these solutions:

  • One vote per IP address is allowed
  • One vote per session/cookie is allowed
Though the problem relies that if we're going to use one of both of these solutions we still might have these issues:
  • IP address can be changed for example when the user joins another network or if the user use a VPN/Proxy or just changes his/her IP address manually.
  • Using sessions or cookies, some users tends to clear their browsing cache which means they can vote again on the same joke.
These might be the only solutions we have so far, since we don't really wan't a user login, since the app should be available without any type of login.
Do you have any other idea how this could be done?
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,921
As Adil said, simply create a unique ID for each Android phone.

Not really sure how it'd work, but once the user opens the app, you could check if it has been assigned an ID, and if not, assign it one right there and then.
 

Heaplink

Developer & Designer
Nov 9, 2011
510
173
The problem is that the Joke app also should be available from a website that also uses the same database. And you cannot get the MAC id trough there without complex scripts of other languages.
 

Adil

DevBest CEO
May 28, 2011
1,276
714
TelephonyManager TelephonyMgr =(TelephonyManager)getSystemService(TELEPHONY_SERVICE);
szImei = TelephonyMgr.getDeviceId(); <-might work, just query the szImei object into the database
 
Status
Not open for further replies.

Users who are viewing this thread

Top