Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

a contribution to the mpos hackathon in berlin feb 2014

NotificationsYou must be signed in to change notification settings

meinharrd/bitcoin-atm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General information

This project shows how the Android SDK can be included within a sample app. In this application weuse features execute transactions (CHARGE / REFUND). Those transactions are registered onlylocally. In a real world application it is highly recommended to register them from yourbackend and then look them up using the SDK. The necessary modifications are explained in comments.

Overview

TheMenuActivity can start two activities (one each for charge respectively refund).

Each of those activities extends theMposActivity which creates the shared provider and alsoprovides convenient methods for elementary UI actions. This makes the actual activity classesmore clear. Those activities will be discussed based on theCharge Activity.

In theCharge Activity the transaction processing is initiated by the user by clicking on thestart button and then we register our transaction using a transaction template. In real world, youwould ask your backend to register it, provide you with the corresponding identifier and look it up.

When the registering/lookup is finished, we connect to the accessory and initiate a check whether an update is required or notand perform it is necessary. After a succeeded update we start the transaction and handle calls ofonTransactionActionRequired(...) and onTransactionSuccess(...).

Prerequisites

Please ensure that you have installed at least the following components using the Android SDK Manager:

  • Android Studio 0.4 (or better)
  • Android 4.2.2 (API 17) SDK Platform - Revision 2+
  • Android Support Repository - Revision 2+
  • Android Support Library - Revision 18+

You can start the Android SDK Manager within the AndroidStudio IDE:Tools >Android >SDK Manager.

How to use

In order to use this example for your application simply apply the following steps on your localmachine.

  1. Extract the zip archive.

  2. Import this folder using AndroidStudiohttp://developer.android.com/sdk/installing/studio.html

    1. Start AndroidStudio
    2. SelectImport Project andImport project from external model (Gradle)
    3. Select themPOSSampleProject folder
    4. When asked select:Use default gradle wrapper (recommended)
    5. Wait patiently(!) while the IDE starts and configures the project (this can take up to 5 minutes)
  3. Use themPOSSample run configuration

  4. Now the app should be built and installed on your Android phone or the emulator

  5. For further usage you want to replace the already included libraries with up-to-date versions. You can examine the current used version within the menu fragment.

  6. You can add the java doc frommPOSSample/libs via the module settings.

Limitations

  • During a firmware update of a card reader no processing information is shown. That doesn't mean, that the SDK is stuck.
  • The app might show unexpected behaviour when confronted with screen rotations while a Dialog is shown
  • The handling ofActionResponses is simplified

About

a contribution to the mpos hackathon in berlin feb 2014

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp