Posts tagged ‘Mobile’

Using the Android Fused Location Provider

location-clipart-map_pin

In 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…)

May 27, 2016 at 1: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 9: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

Testing iOS Apps on Hardware Devices

Deploying Apps directly to devices

One of the trickier parts of doing iOS development is registering your device (iPad, iPhoLightning-Cable-and-iPhonene, or iPod) with Apple so that you can test an app on that device. This process is called creating a provisioning profile. You can follow either the  Apple guide or the Xamarin guide for doing this, but I’m writing my own guide because things didn’t go very smoothly for me while following either of theirs. (Although the Xamarin guide was easier to understand.)

I’m doing iOS development using Xamarin Studio, but the process for creating a provisioning profile is essentially the same if you are doing development with Xcode.
(more…)

March 7, 2016 at 6:34 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

Xamarin Certified

Certified in 2014

Free Guest Access!
I’ve added free guest access to the first two weeks of my course here: CS235AM Moodle Course. You can log in using the “Guest” button without being enrolled as a student at the college. If you like what you see, you can enroll as a student at Lane Community College, then contact me so I can clear you to register for CRN 33368. The class starts January 8, 2018, but you can register later after cheking out the first week or two.

(more…)

September 9, 2014 at 8:39 pm 1 comment


Bird’s Bits

Computers, software & the Internet

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

Join 41 other subscribers