prevent multiple installation of my android app - android

I want to control installation of my app on each device by sending its ANDROID_ID to a server and control it there. But according to this link in android developers blog this isn't a suitable approach to do that.It says:
the requirement is to identify a particular installation, not a physical device. Fortunately, doing so is straightforward.
I want to know how this way is possible for my needs?
Edits:
let me explain this more clear. I want to get user a registration code and let the user to install my app on 3 different devices by using this code and control this by a server.

First of all, on rooted devices there is not much you can do. When one tempers with the ROM he can make two different devices identical: every API call aiming at finding a difference can be altered to return the same value. So if you want a solution that is absolutely safe, you're screwed.
With normal users seeing the problems in the Android API, I would suggest a hash of every device identifier you can find: IMEI, IMSI, ANDROID_ID, MAC address, Device type, manufacturer... This way you will surely grant 3 installations to normal users.
It's always better to have some free-riders than to have angry customers who cannot install the app on 3 devices because of some Android API bug that gave them the same device ID for their devices.

Related

Identify specific Android device hardware from website

I'm deploying a large number of Android devices for a project which are owned and controlled by me, including with a Mobile Device Management system.
I don't know how to identify the devices when the device is being used to log into our web-based services. We can know who logs in, obviously, but not what device they are coming from.
Ideally we would know the IMEI or Serial of a device when it logs in, but it can really be any unique identifier
I 100% understand why this information is not typically available to a website -- it's easy enough for advertisers and other to track people! However in our case, we own both the endpoints AND the website, so it seems like something should be possible.
Typically our devices clear the cache on the browser when they reboot, so it likely can't be something based on the cache, but I could explore more options here and see whether it's possible to disable this.
The website is based on React, if that's helpful. However, we could use another page built on whatever makes this easier if needed.
We do also have native Android apps running on the device, but I don't know if we can pull information from them into the browser somehow.
Note that we've tried using the WebRTC method to grab internal IP addresses, which works to some extent but is not ideal since it's inconsistent and is blocked on later versions of Android's browsers. Also if the device changes IP, that method no longer helps.

Is it possible to know whether an android phone has OTG support without rooting?

Is it possible to know whether an android phone has OTG support without rooting? If so how? I am asked to check some information before developing an app for android.
Yes, you can download a USB On-The-Go checking application from Google Play.
This one below for instance doesn't require root, although it does require that you follow the exact plugging and unplugging steps.
Before I give you the link thought, I must warn you that this app asks for way too many permissions and can display very intrusive ads that can draw themselves on top of other apps. If you install this, definitely uninstall it and get rid of it as soon as you're done with it.
Another thing you could do is just google for the exact model name. That kind of information is usually included in the specs, in the pdf specs, in wikipedia, or in some tear-down blog. If the specs won't even tell you the usb version number at the very least, then you'll know to keep on looking.

Checking why an Android device is not supported

I've struggling for a while to find an efficient way to check why certain devices are not supported by an application I'm developing.
From time to time I get a support call saying that a new update of the app is not supported.
I'm aware to the fact that sometimes I add some features/permissions to the manifest and I can't always support all devices.
The problem that in most support calls I don't have access to an actual device as reported.
What I did by now is sending several sample apps with various features/permission permutations in order to see which can be installed and which are not.
Any other ideas?
Is there any online service which I can send an APK to and it will make sure to run it on a specific device?
Tried, without success, but is there a way to imitate a specific device using the emulator?
Thanks
According to Google, if you're using the <uses-feature> the play store should check the user's device for you, before allowing them to install / update.

Replacing phone.apk with a customized app

I need to know what are the steps in modifying the phone.apk app on android, which allows to call and receive calls (and what is shown upon talking on the phone).
What do I need to do (of course I have a rooted device)? is it possible to do the tests on the emulator first?
my guess is that I first need to fetch get its source somehow, use some kind of system signing, do the changes and put it forcefully into the device, maybe also restarting it.
However, I've never done such a thing and I couldn't find much help in xda forums and here, maybe because it's pretty hardcore thing to do , plus it might not work well on some devices.
I've noticed that the only thing that shows this is possible is the calls-recorder patch, which is incredibly cool by itself.
First thing is you need source code. Phone app heavily depends on the radio interface layer and radio interface layer is proprietory to what kind of communications processor they use.
I believe you cannot test on emulator unless you are working on nexus family of devices. Also phone app runs on a particular shareduserid which can break other apps running with same shared user Id . So you will need platform certificate for signing which is next to impossible for release version of phone software.
One thing you could do is download cyanogenmod code for your phone , do changes , build and download the whole of software on the phone rather than just phone apk.

Want a phone to develop android apps on must it be unlocked?

I want to test my android app on a phone. I do not have an android phone so I was going to purchase one. Question, I can get a phone on eBay etc without a contract will this work to test my app? Or must it be an unlocked or rooted phone? Can I install and test my apps on a phone that has not been unlocked and does not nave a contract?
Ordinarily you can develop applications (but not hack on android itself) on any android device intended for the average consumer.
HOWEVER there may be some difficulty in setting up a user account to be able to do anything at all on the device without putting a (compatible?) sim in it.
A little web searching is showing two potential solutions - one which appears to require root is to manually change the settings database and thus skip account setup.
Another is to use the adb command line to get around the no sim message and launch the settings activity to enable wifi and do account setup that way. It doesn't seem like this should require root.
You might want to make managing to set up a user account a pre-condition for completing the sale, or buy a phone locked to a provider who markets prepaid sims to international visitors.
My guess is if you get an early htc phone like g1 or mytouch or (or google versions adp1, ion, etc) you will be able to get it to work - if it comes to it they aren't hard to root, and they'd be the cheapest anyway as they are out of date. Later devices and other manufacturers, no idea. Of course if you want to target android 2.2 you need a later device.
You do not need a rooted/unlocked phone to test applications on.
http://developer.android.com/guide/developing/device.html
edit: beaten to the punch

Categories

Resources