I am self teaching my self android and making an app for a mobile application contest. I have all my code working on an emulator with the correct permissions and for a sms text being sent to user specified contacts as well as a link to the google maps position of the user. I will be demonstrating the app on a tablet that only has WIFI and doesn't use cellular data.
My question is will I have to make any additions for the app to be able to be used on this tablet or would it work just as the emulator does?
There are not some ultra big difference between real device and emulator but still there are some :
You can't test onTouch events on Simulator I mean you can do it via mouse clicks but it's not the same
Emulator use your computer CPU ram and things and application will probably run much faster on Emulator then on Real device (You should be aware of that)
Regarding GPS and location you can simulate that on emulator almost the same as on Real Android device
You can't get the real performance result on Emulator because it will ignore all apps running on real device, battery etc...
But generally if app is working correctly on Emulator it should work on Real device also but i suggest testing on Real device if possible.
From #Spirit answer below:
Emulator use your computer CPU ram and things and application will
probably run much faster on Emulator then on Real device (You should
be aware of that)
all of my experience has shown that testing on a real device is actually leaps and bounds FASTER than using any emulator. it's much easier to debug as well.
i really recommend using a real device to test on.
Related
I'm starting the studies about android development with Android Studio and I was wondering if it's possible to build applications only running code on a physical device or do I need to emulate others devices in order to avoid errors, etc.?
The Android Studio emulator barely runs in my machine, so I need to know if it is essential for the apps development or if there are other alternatives.
If you need to run on different versions of Android, just what #CrazySports101 mentioned, but also test different screen sizes & resolutions to check UI responsiveness, it would be better to use emulators.
Obviously, you can start development using either a single emulator or physical device, but during your final testing stages, it would make sense to use emulators to test all your device specific usecases.
And yes, there are few limitations with using an emulator, like it cannot emulate network connectivity, other real-time data, such as GPS, sensors, battery issues, etc. Or usecases such as calling, receiving SMS is not possible as well.
If you have a physical device, you can just use that. No need to run the emulator at all. An emulator is mostly used because it is convenient and easy to test different versions of android. For example, some libraries/UI component may behave differently on different phones.
It is better to use a physical device if your app is using radios like Bluetooth etc.
If you just started to learn android studio and your device can barely run emulator, I would recommend you to go for physical device. Emulator makes you possible to try your product on different version of android and screen ratios, but you can not emulate network connectivity, real-time data, GPS, sensors, battery issues, calling, receiving SMS is not possible. But if you are trying to launch a product in a market you should go for emulator as you would need to try your product on different versions as well.
We're starting exploring Xamarin.Form as a mobile development using Visual Studio 2015 on Surface Pro 2 machine with 8 GB RAM. We found that when we debugged/deployed into Visual Studio Emulator for Android. It takes a bit time to deploy.
I'm just wondering if we have a proper phone ie. Android device or iPhone will this make faster in term of deploying/debugging speed?
I'm appreciated your feedback.
Thanks
Isadewa
Sure when you use real device you are using the phones's cpu , Gpu , ram to run your app but when you try to use your pc every time you are starting a vm that takes resources from your computer and slows it down so you are probably using and ide and you may have some chrome tabs open so if you are that guy who open alot of chrome tabs , launch alot of apps at once defintly debug on your phone.
for sure testing and debuging your application on mobile device is much better for the reasons below:
Emulators are virtual machine that consumes memory and processing power from you computer which makes you computer much slower, which doesn't hapen when you debug on Mobile.
Mobile devices are better when your app is developed to consume and access mobile resources like camera , contact, push notification ... etc.
The only reason that you can make benefit of emulator , if you want to test your application on a specific mobile device and you don't have it for the moment , then I would prefer to configure an emulator with the specific mobile aspects and test my app on it .
Definitely real device debugging fast as compare to emulatore because emulator taking lot of time to launch even though you configure different cpu, and more ram but real device will be feasible for debugging.
Prefer always real devices because its properly give response while debugging.
I want to get into developing apps for Android because of its large userbase. However, at the moment I do not have a smartphone. I'm also not too keen on getting an Android phone in the future.
What problems could I encounter when developing apps for Android solely using an emulator? I could use my parents' Android phones for the occasional testing, but will an emulator prove sufficient otherwise? Furthermore, is it possible to set up an Android Virtual Device with low-end hardware on my computer to test out apps with low-end phones?
note0: I do not plan on developing apps which require use of the phone's sensors (such as gyros, GPS, etc.) I only plan on developing apps which require internet access for API calls and perhaps microphone usage (I can't give away too many details right now ;) )
note1: I know this question has been asked before on stackoverflow (albeit 4 years ago). However, I feel it is important to revisit the question because emulators, hardware, and Android itself have changed enormously in the last few years.
edit: My main issues are problems like the app looking weird on the phone despite it looking fine on the emulator or working slowly on the phone but working fine on the emulator. Will every app which works fine on the emulator work fine on the phone as well with a similar hardware configuration as the emulator? I'm in particular targetting devices with Android 4.x/5.x.
Without a doubt, the biggest problem is that many functions like push
notifications, maps, geo-location, in-app vending etc. cannot be
tested with an emulator. The reason is that all these functions are
present in the Google Play Services library which is not present on
emulators.
Another important reason for testing on hardware devices is that the
OS implementation is changed by manufacturers like Samsung, HTC and
others, and therefore, certain problems & exceptions are not observed
till a real device is used.
But the most important reason has to be that running apps on an
actual phone is a hell of a lot more fun that it is with the painfully
slow and retarded emulators! One of the most important things about
Android is that anybody with an Android phone can easily explore
computer science concepts by running simple programs on their phone.
It is incredibly easy, even for a novice, to just fire up their
Android device and start exploring the world of programming! Till just a few years back, it was incredibly difficult to debug an app on a Symbian or Palm or WinCE device. iOS is still as retarded when it comes to running the simplest apps, you have to create a provisioning profile to run a Hello World app on an iPhone!
EDIT:
If your processor supports Intel virtualization, then the emulator can be made to run as fast as a real device. You need to check that out. If your PC is low-end in the sense that it does not support such virtualization, then running and testing Android apps will be a painful, tedious experience that will suck all the fun out of the development process.
Emulators do have one significant advantage over real devices - an emulator is able to access web services on a localhost. If you are still in development phase on your local server and have not yet shifted to a publicly hosted environment, the emulator can easily access web services on a local server. All you have to do is put your computer on the same network as the local server and you're good to go. A real device cannot access a localhost; its impossible, as far as I know.
The Android emulator is a true emulator - it emulates sensors as well, so in fact you can test sensor programming (with some limitations) on an emulator. It cannot do things like GPS, maps etc. because those features have been migrated to the Google Play Services library, and they require a valid Google account to be used, which is why that library is not present on an emulator. If you only plan to work with web services, APIs', GUIs' then I suppose an emulator is more than sufficient. Unlike the iOS simulator, an Android emulator generally exhibits the WYSIWYG behavior, so your GUI will not differ on actual devices, although you do need to test your GUI on multiple AVDs' with different screen form factors.
What is the recommended way of testing an app on a device? The emulator is slow, mostly unresponsive and a cpu beast on my machine, so I use my phone to test my app. When I make a change to code, Eclipse builds it automatically, and then I debug it on the device. Is this the most efficient way to test small changes in code?
Android has some information on testing here. Personally I've found that testing code is much faster on a device. Other options without a device is to use something like Android x86 and run it in virtual environment like VirtualBox - this can be faster than the emulator. In my opinion, to really make sure your application is working as expected (especially with graphics and memory usage) is to test with the device(s) you intend to deploy the application on.
That's how I test my code, the emulators and on an actual device are the only ways I know of. I usually use an actual device, but I think you can keep an emulator running to speed up time a bit, but not too much.
It's in my opinion a good way to check the general functionality of your application. If everything works fine, I would use the emulator to check with different versions of android/screen sizes/resolutions etc. Maybe you can ask a friend who has a more powerful PC. The best possible thing is of course that friends/family/relatives etc. own Android devices so you can test your application / let it be tested on real devices.
Instead of shelling out ~$600+ for an unlocked Android development phone device can you use a used phone that is not connected to any wireless carrier?
I see Android phones for sale on Craigslist all the time that people want to get rid of whenever they get an upgrade. They are usually a year old at least but as long as it is in working order that's okay with me.
Are there any downsides to this? Can you use these phones as legit development devices? Are they crippled or anything if they are disconnected from a carrier? They can't make calls or send/receive text messages obviously. But as long as you can use them with a WiFi connection it seems like you'd be able to test quite a bit.
Precisely what you said. You can't make calls/receive texts, but for development it's good enough. Don't know actually if Market will work, but you will find out soon enough.
The only thing that comes to mind is that locations are often provided by carrier networks. You will then need to be connected with WiFi or use GPS to find your locations.
The emulator works pretty well and then you wont need an actual phone. Unless of course you want access to the sensors. Even then you could use the monkey tool to simulate sensor input.
You can use any android phone for your development. So far all the phones I have ever seen has a development menu under preferences. As long you enable debugging and installing unknown apps it should be fine. For full system access you would need rooted phones, it does not matter if the phones is locked to a carrier or not.
Although you can develop on the emulator, you might fail because of the mobile network speed, device io and touch sensitivity. It is best to at least test on a device before publishing. Meanwhile most modern phones run faster than the emulator so if you are ok on emulator you should more than ok on the real device.
I work with several no-contract/no-sim phones with no problem. My first dev phone was a used T-Mobile myTouch 3g (that I bought on Craigslist). The great thing about T-mobile is that you can pop in a pre-paid SIM and get 3g data when you need it for $1.49 per day.