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
Related
I'm making an Android app that is used as POS in some business. In order to gain attraction the app is given with the phone, an Internet line and the app. I want to restrict phone calls, whatsapp, SMS and so other. I want the phone to boot directly in my app.
I was looking into Cyanogenmod but couldn't find any information on how to do this.
I mean, isn't it my hardware?
EDIT
I'm open to use other OS.
My device is a Samsung Trend initially.
I've read that you can replace an .apk and start your own app instead of the android menu (I know the user can then change the .apk, so still, it seems the better solution, anyway I couldn't find any information on how to do this)
I'm not 100% clear what you're asking for (you're giving away an entire phone with your app!?) and you didn't mention the phone model or Android version you are using, but there are apps out there which allow you to restrict a phone's ability to run or access certain features. (To find more, just search the Google Play Store for "kiosk".)
Android 4.2 on tablets introduced multiple user accounts, which were expanded in Android 5 Lollipop to phones with "profile accounts", which can be used to restrict access to apps and services. Screen pinning is another feature you can use to lock a particular app to the screen so that it can't be removed without entering a password.
It is your hardware, and as such you can also take more extreme measures by modifying the Android frameworks directly to restrict functionality, by say, removing the dialer. But if you're actually giving away phones with your app, there's always a possibility the new owner will restore the functionality and/or replace the ROM completely.
I've developed a couple of Enterprise iOS apps for our users in the field. Some have expressed a preference for Android devices over Apple, and I fully understand. I do not have an Android phone, nor do I want to get one and have a second account to maintain. I'm wondering if I can use an inexpensive Android tablet to reliably test an application that will ultimately be running on an Android phone? The app will need to communicate via internet to a server via cell connection or wifi.
Also, any advice for an Android newbie developer would be appreciated.
Yes you could test on a Android tablet but it would be hard to see how it render on a phone.
You could also use the Android Emulator to test different size and android configuration.
Yes. I developed my first major Android app using only a couple of cheap tablet devices. It's fine; the only thing you can't really test is "what happens to my app when a phone call comes in." Plus if you can get the emulator working under HAXM, or some other similar setup where it doesn't work like a tortoise trapped in amber, you can test on a variety of simulated devices perfectly well.
Other things to consider:
You'll probably want to test your app on a variety of different hardware and Android versions, in particular I'd recommend testing on older devices. This means that you friends' old Android phones are a great source of cheap test devices. I regularly gather phones from friends that would otherwise just end up lingering in the back of a drawer as a "spare" that will never actually get used. Bear in mind that you can use all the features of a phone apart from the actual phone bit without a SIM, including a WiFi-based data connection.
You may find that you can find good, contract-free "pay as you go" phone SIMs. I use a provider whose "credits" don't expire, so I have a phone connection for my test devices where there's no ongoing cost, apart from the actual calls I make when testing.
I am planning to develop and test the android app on a device instead of emulators.
Can i test the app with out rooting the device. Please share your thoughts.
Thanks.
Yes (and good choice by the way - those things are mind numbingly slow), you simply allow debugging (Developer Options) in the phone's settings (specific to device, sometimes hidden), connect with a USB cable, write the app, start the app, choose to run on said device.
The emulators are good for testing the UI on device types you don't have access to, like a tab for example, that may require additional resources like layouts and images. Or, of course, if you don't have any devices.
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.
I am currently working on a research project which involves people playing games on an Android device. I am hoping to be able to write an android app that records the accelerometer and touch events. I would like my users to be able to play games such as angry birds, whilst I record their touching data.
I understand that this type of data collection is possible from inside the app, but is it possible from outside the app? (perhaps via an app running in the background?)
If this is not possible, are there alternatives? (I believe I could theoretically go into the android OS source code and make this happen?)
I understand that this type of data collection is possible from inside the app, but is it possible from outside the app? (perhaps via an app running in the background?)
For touch events, no, for obvious privacy and security reasons. It used to be possible (research the term "tapjacking"), but current versions of Android finally blocked this behavior.
For accelerometer events, you can record those, because they are the same for all apps simultaneously. Bear in mind that your sampling rate may not exactly match that of the app being used.
I believe I could theoretically go into the android OS source code and make this happen?
Yes, though you would then need to turn that modified Android into a ROM mod and install it on devices.
Apps are not allowed to do this on a secured device (ie, consumer phone/tablet that has not been 'rooted').
However, depending on your needs it may be possible with the development tools connected to a computer. If you can do some moderately annoying setup before each controlled-circumstances trial, I believe you can do it on some stock devices by using the USB cable to switch ADB into wifi mode, then monitoring input events over a wireless ADB session. See
http://source.android.com/tech/input/getevent.html
That document seems to imply that 'su' is needed (which is odd as the official 'su' isn't usable by non-root users), however it works without on many stock devices.
You'd probably also want to be running logcat to figure out what application is in the foreground.