My app presents the device contact list for the user to select a contact. However, I do not see the device login - the name & email used to sign in to the android store - in the contact list.
I've read other posts showing how I can get the device login from the system profile. However, I'm trying to understand what prevents or allows that login info from getting added to the gmail account contacts list.
Ultimately, I want to use this info for the user to register his usage of my app. With that, I intend to receive the user's name and email address (with his permission, of course). Perhaps there's a better way to approach what I want.
That account used to login to the device is the user's account. The contact list you are talking about are the user's contacts. If I were the user, I think it would be odd to have myself listed as one of my contacts...
It sounds like you already know how to get the information you want. I don't believe there's a "better" approach than simply doing that. You need to be more clear on why that is not a good approach or what about that approach needs to be improved.
Related
I'm looking for an easy way to get user's gender & age programmatically without any user input. I do not want to trouble the user with any sort of sign-ins to G+, FB or Twitter.
Just need a quick and easy way to get gender & age.
Is there any way to get user's gender and age without requiring any account sign-ins?
Are there any SDK's that would give this info without sign-ins?
There isn't any. You have interact with user to get the details, either by sign in or asking by yourself.
In some cases, you can however get some details, there is a contact, called as User which a few users fill. It might have the information you require but it is mostly empty.
But you shouldn't use this as it might be against user's will. You should use sign in or input fields.
If you are only looking for getting this information for statistical purposes, I'd recommend using Firebase analytics. Firebase automatically gives you age and gender distributions of your users.
https://firebase.google.com/docs/analytics/
You can't get any information without the user giving them to you (either with stating them in the app or giving you permission to take them). As #Sahil stated, IF the user has a contact with that information in order to take them you must get contacts permissions, which is not very smart having in mind that you only need users age and gender. The best way is to have a dialog or something similar where the user will state this informations.
I think this may not be the right question for this forum, but I could not think of where else to post it.
However, here goes. I am creating a dating app in android. One of the major hurdles I am facing is user authentication and verification.
Put simply, how do I ensure that a user is who he/she really says he is? How do I prevent, or reduce people creating fake profiles on the app? One way to do this would be to force the user to connect with his facebook account, but again, fake facebook profiles can be created.
Is there any other good method to ensure user verification?
The best way I can think of, although not fool proof, would be when the user creates an account it sends them an email where they need to click a link. Clicking the link can ask for some confirmation of something, such as their chosen username and or the first name and last name etc. If they fill in this information from the email, they're probably legit and you can mark the account as active within the database. If after x number of days delete any accounts that have not been verified.
Is there an easier way to check who has installed my app using the Google plus API? I am listing out friends list where I would like to show the user if the his/her friends are using the app if not invite them?
As of now, I am getting the unique ID from the friends list and checking in backend with a database if the user is present or not.
Can somebody let me know what could be the best way to achieve this?
The people.list API method supports a collection value of connected.
The list of visible people in the authenticated user's circles who also use the requesting app. This list is limited to users who made their app activities visible to the authenticated user.
whenever user installs my android app, i should get their device info and i like to maintain a webservice about the user who installed my app..is this possible?, is it valid to do that..in general does App development companies will have the user info who installed their app?
Generally, developers keep anonymous statistics, or identify individual users using the IMEI number or the wifi/bluetooth MAC address. It is generally a very bad practice to use the user's phone number. Rule of the thumb is that if you want personal contact details like the phone number or email address, you explicitly ask the user the enter them, and take their permission to use then for whatever purposes. You should never take personal information from the user without their consent.
Following are my problems:-
Is it possible to get the list of applications that a user has installed, against their google account through Google Play, programmatically through the use of any api?. Please note that I am not asking about the list of apps currently installed in the device, but ones that have at some point been installed.
I need a solution to the above as I am thinking of a scenario in my app, which is:
I want to give my app to the user for free during the first three months, after three months if user uninstalls the app and then installs it again I want to detect through any api (from Google Play) that the user has installed the app a second time (and should not get any free usage). Please note that I don't want to use any web service to store the account id & device id of the user at my side.
For option 2, you can create a file on the SD card. This will remain there when the user uninstalls/installs. But the user can always delete your special file. Unless you do something at your side, you are never sure if the user already used your app before.
To be completely sure, store it online:
You will need to have a very simple database which holds a list of device_id that installed your app.
Further more a webpage which fills this database.
In your app you download/open this webpage which the webpage will fill the DB.
App > WebClient (or other) which opens http://www.example.com/registerDevice.php?device_id=. The php site fills the db.
You app will need to check the database if the current device already has installed this app inorder to work/not work. You can do this via the same php and check the response. You could for example return 'ok' or 'not ok' or something else.
The simplest method is to get the account of the user the first time he/she runs the app, and send that detail over to you.
How this is can be done is well-documented over here: How to get the Android device's primary e-mail address
You will have to add another line of code to check back to the database at the first start of the app.
EDIT: For a non-web solution, simply add a timer to the start of your app:
schedule(TimerTask task, Date when)
the task should be adding a token AFTER the period of time you wish to give, to the phone's memory with the user's account details for authentication (see first solution on getting the account details)
Finally, as above, add a check-back to the phone's memory for that particular file to see if the user has used the app before.
The problem with any type of authentication that is based on the phone's memory is that people can easily remove the token, if they can find it, and reuse the app again.
Try this device specific implementation:
PackageManager packageManager = getContext().getPackageManager();
List<ApplicationInfo> applications = packageManager.getInstalledApplications(
PackageManger.GET_UNINSTALLED_PACKAGES);
// retrieves some information about all applications (even uninstalled ones)
// which have data directories
Of course this method won't work if user replaces the device. But you don't need to use any web service.
You can use this by keeping a database of hashed device id and users google id on a 3rd party server.
Also see http://android-developers.blogspot.de/2011/03/identifying-app-installations.html