views:

325

answers:

3

Hello everyone,

I've just start to study Android. But I have no linux PC & Android phone. I just using Emulator on Windows OS.

Now, I wanna try to use Sql lite & Contents provider on Android. Can I test sample code on Emulator without Linux? Some people say that I should build Android on Linux ad make Image for Emulator. Then test on Emulator on windows. Is it right? or Can emulator works alone?

Thank you for reading.

A: 

Android SDK works perfectly under Windows also.

Mihai Fonoage
thanks. I gonna try right now.
A: 

You don't really have to "build" Android if you don't want. Before you use the emulator the first time you have to create an "Android Virtual Device", then you specify it whenever you start the emulator. See the emulator docs, specifically the sections on "Starting and Stopping the Emulator" and "Android Virtual Devices and the Emulator" (also "Creating an AVD").

That said, the Eclipse development environment and the emulator will run fine on Windows. Just download the SDK then follow the instructions for installing. Once you have those set up that's all you need. It acts more-or-less just like a real phone, so you can test most anything (including SQLite and Providers) on it just fine.

fiXedd
A: 

Most parts of android run well on the emulator. fiXedd answered your question well, I just wanted to add my two cents.

The only problems you will run into with the emulator will come from wanting to use the sensors, including the Camera (although there are some workarounds on the internet that attempt to connect the emulator camera to a webcam) the accelerometer, orientation, and geomagnetic sensors. GPS is a special one - the emulator will not crash or otherwise act strange if you access it using code, and you can use the tools provided when you install the SDK (in your SDK folder under tools/) to send mock locations to the emulator. Beware of round off in coordinates on doing this, and understand that it is a fairly painful process still. Using KML to auto-play a route is much easier than typing it all in.

For development, you will need to avoid using the sensors if you are running on the emulator. For around 150 (ebay as of today) you can get a G1, and it is a very simple matter to avoid the setup screen, allowing you to develop/test on a device with sensors without ever having a SIM card.

Hamy