Posts tagged ‘Android’

Using the Android Fused Location Provider

location-clipart-map_pinIn this post, I’ll walk you through the code in a very minimal app that just demonstrates getting locaiton. This app was created using the Xamarin Android platform, so it is written in C# but still uses the Fused Location Provider API which is provided by Google Play Services . My code is available on GitHub in a Xamarin Studio / Visual Studio solution: Geolocation Demo. (more…)

Advertisements

May 27, 2016 at 2:29 pm 2 comments

The Google Play Services APIs for Android

GooglePlayServices

Why Use the Google Play Services APIs?

Google Play Services (also known as Google APIs for Android) and abbreviated GPS, is a set of APIs that are delivered in the form of an app that can be updated via the Google Play Store. The reason Google provides these APIs this way is to reduce fragmentation of the Android platform. Fragmentation is a result of many different versions of Android running on devices out in the wild. (more…)

May 27, 2016 at 10:05 am 1 comment

Testing Location-Aware Android Apps on an Emulator

Tricky Android Emulator SetupGet Last Location

I found that testing apps that use the Android Fused Location Provider on an emulator
can be a bit tricky! (But, as a software developer, doesn’t every new thing you try turn out to be tricky?)

You need Google Play Services to Access Location Data

The Fused Location Provider is one of the APIs provided by Google Play Services. If you are creating a location-aware app, Google recommends that you use the this API rather than the older android.location API. In order to test your app in an emulator, you will need to have Google Play Services installed. The default Google Android Emulator images don’t include Google Play Services, but it is available and you can include it when you create an AVD (Android Virtual Device, aka emulator).

Watch a video of me using this post to set up an emulator:

http://screencast-o-matic.com/watch/cDhuruiixn

(more…)

May 26, 2016 at 5:33 pm 1 comment

How to Enable Developer Mode on an Android Device

If you are developing Android apps, you will want to test them on an actual device. In order to do this you need to enable Developer Mode on your phone or tablet. Here are the steps to do this:

  1. Open settings
  2. Go to About Phone or (About Tablet)
  3. Scroll down to Build Number and click on it 7 times
    (Yes, that sounds strange, but that’s what you do.)
  4. Now go back up to your settings list and you will see that Developer Options has been enabled.

I’ve attached a video so you can see how this is done.

October 2, 2014 at 2:47 am Leave a comment

Setting up a Windows PC for Xamarin Android Development

I just got done setting up a Windows 7 PC (setup for Windows 8 is identical) for Android development using the Xamarin Android application development platform. I wanted to be able to development with either Visual Studio 2013, or Xamarin Studio 5. So here are the steps I followed:

  1. (Optional) Install Visual Studio 2013 Professional or higher- you can’t use the Express Edition. Also, you will need a Xamarin Business license. Don’t worry if you don’t have Visual Studio Professional- you can use the free Xamarin Studio instead!
  2. Install the Android SDK using the “stand-alone” option. Download the Android SDK
    1. Run the Android SDK manager to update everything to the latest versions (you have to launch the SDK manager as an administrator).
    2. Using the SDK manager, add support for any Android versions you might use. You might also want to add the Google Android USB driver or Intel’s Hardware Acceleration manater (HAXM).
  3. Install an Android Debug Bridge USB driver for your hardware device. If you are using a Google Nexus device you can install the one that is provided by the Android SDK. You will need to open the Windows Device Manager and use it to install a composite adb driver. If you have a phone or tablet from another manufacturer, you will need to install a USB ADB driver for that device.
  4. Install the Xamarin software suite (this includes Xamarin Studio). Download Xamarin
  5. Install GenyMotion, an Android emulator that is vastly superior to the one included in the Android SDK. Download GenyMotion
  6. You’re done!

Now you should test your setup. Here are some things to test:

  1. Start GenyMotion and install a virtual device, then launch that device
  2. Run Xamarin Studio and open the “Hello Android” project. Select GenyMotion as the target for running the app. When you click run in Xamarin Studio, you will see the app run in the GenyMotion emulator.
  3. (Optional) Repeat the above two steps using Visual Studio
  4. Plug in a phone or tablet, enable developer mode, and select it as the target in Xamarin Studio. Now run the program again. The app should run on the device you plugged in.
  5. You’re ready to go!

September 9, 2014 at 10:01 pm Leave a comment

Xamarin Android course

You can take this class from anywhere in the world, since it is offered both on-line and on-campus! For registration and enrollment information check out the CIT Computer Programming web page.

Here is a recent syllabus: Spring 2016 Syllabus

BTW, If you aren’t a programmer and want to learn to create Android apps using a simple drag-and-drop approach, you can take our App Inventor class- CIS125M, Software Tools: Mobile Development.

September 9, 2014 at 8:39 pm Leave a comment


Bird’s Bits

Computers, software & the Internet

Recent Posts

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 37 other followers