Computer Science student, web professional

Archive for July, 2011

Connecting Android to .Net Web Services

I have  successfully implemented a form with numerous elements. I’m taking the next step up and attempting to connect Android to .Net Web Services. I have had to learn about WFC services through Visual Studio 2010. It has been difficult to pick-up the environment aspects of Visual Studio and setting up the services and making sure all the references and service references are correct. In addition to this, you have to learn a couple of attributes which allows your methods to be used via the web service. Connecting to the database has also been challenging due to the nature in which the organization is managing the umbrella project that I’m working under. 

With in the project an entity type of the database was developed by the main programmer, which is what fellow programmers utilize to make a database connection. All calls to database tables and the associated fields. On top of learning the software, I am also trying to pick-up the C# that I need in order to do some funtionality within my C# functions.

After learning just a glimpse of Web Services, C#, Visual Studio, and more, I need to address how to pull all of those services into the Android project in eclipse. I have had extensive research online looking for resources. I have worked with a fellow-intern to watch videos on setting up the environment in Visual Studio, but nothing has been quite found for the Android consumption of web services.

I found this resource online I think it may be exactly what I’m looking for, but I’ll have to check it out via my own code and environment.

Quick tips on Android Development in Eclipse

Within Eclipse there are a couple of quick key presses that go a long way. For example, Ctrl + Shift + O adds any packages that need to be imported. Ctrl + F11 runs the visible application saving a couple of mouse clicks.

Eclipse requires you run the Android applications in a virtual machine (Android Virtual Device – AVD) to use the emulator.  Android runs Dalvik Virtual Machine.

Android uses the Content Providers to store & retrieve data. It uses the android.provider prackage. When you are going through the data returned, using curser object will only read the data, but by using ContentResolver you can add, modify, delete data.

The Activity class performs the actions. There may be multiple actions, but only runs one at a time. The onCreate() method is what performs initialization and UI setup.

Android uses View object to work with the UI in drawable objects. It works with buttons, images, etc.



Tag Cloud