Skip to main content

Posts

Showing posts with the label Android Pay

Android Pay Example with Android Studio

1. Create an Android Studio ProjectOpen Android Studio and create a new project.  Enter your Application Name and Company Domain.On the Add Activity screen, select Blank Activity and click Next. The next screen will ask for an activity name, layout name, and more.  Leave the default values and select Finish.


2. Configure your Gradle Build File
Add Dependencies The Android Pay API is part of Google Play Services, so let’s add a dependency on Google Play Services to the project:Open thebuild.gradle file in theapp module and add the following to the dependencies block:
dependencies { compile'com.google.android.gms:play-services:7.5+'compile'com.android.support:support-v4:+'compile'com.android.support:appcompat-v7:+' }

Next, click the “Gradle sync” button in the top toolbar.  If this button is grayed out, wait for Android studio to finish loading the project (you can see progress in the lower right):  to download the dependencies you just added.


3.Configure the And…