-1

I want that user can post on my android app (on a discussion) without registration. But I also want to make an identification of the post, who posts the post. I thought I will save user's phone's IMEI no to identify him. So that I can show his post to him (on my posts section).

Is it safe to use IMEI? Or is there any way to do my work successfully. I want to add that I will save the post to my web server.

Sudarshan
  • 938
  • 14
  • 27
  • So you can't use tablets, then? See [here](http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id). – 323go Aug 19 '15 at 02:50

2 Answers2

0

On Android you can save data in the "sharedpreferences" and retrieve the saved key later to display posts made by the user. However, if the user clears your application data, the key is lost. An other option, you can use Android MySql, save both userId and postId or just postId. When the user launches the app, get posts from your server. Hope this help.

mdamia
  • 4,447
  • 1
  • 24
  • 23
  • It's a good idea to save a post id. Once I thought so. But as I am using web server, php to save post, the exact post id may may not be got. Or I don't know the way to get the post id. – Sudarshan Aug 19 '15 at 03:22
  • Where do you save the posts? if they are in a DB , you can get the users posts. look into android.database.sqlite for Android Applications, you can save the postId on the mobile app and fetch the same postId from your server. – mdamia Aug 19 '15 at 03:43
  • I will save my posts on MYSQL database on my web server. But when the post will submit, how to get postId? One way I know, getting the last post id but if two posts submit at a same time, then what will happen I don't know. – Sudarshan Aug 19 '15 at 06:26
  • you are right last post id is what you need. each post submission will return the post id entered into the table. – mdamia Aug 19 '15 at 06:32
-2

im not that much in android app development, but it is possible to change the IMEI number of android phones easily.

Also, if 2 users want to use the application on the same smartphone, there will be an issue.

if you don't set up registration with at least email, im not sure you can log which user posted what.

segfault
  • 95
  • 7
  • You are right. But my apps is for the students who wanna sit for a particular exam. And may be there will not be too much user. Thanks for ur advice. – Sudarshan Aug 19 '15 at 02:49
  • so why don't you just use the student's logins ? I presume in your school, there is an identication name for each students right ? – segfault Aug 19 '15 at 02:54
  • also, you could check this post, that should help you http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id – segfault Aug 19 '15 at 02:57
  • It's not for school. And I am trying to find a way without registration. – Sudarshan Aug 19 '15 at 03:24