Skip to content
PhoneGap native plugin for Android, for Moga game controllers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The PGMoga plugin is a PhoneGap native plugin that is used to handle input from a Moga game controller inside of a PhoneGap application targetting the Android OS/platform.

More on Moga controllers:

This implementation is intended to be a proof of concept demonstrating how you could integrate the gamepad within your application. It currently only supports input from the joysticks (axisX and axisY) and the A and B buttons, it does not handle all possible input from the controller.

This implementation is adapted directly from the com.bda.controller.example.demo.listen example from the Moga developers SDK samples available for download at::

These samples were developed targeting PhoneGap version 2.9, for more detail see:

All samples need the com.bda.controller.jar file that is available as part of the Moga SDK download (target Moga SDK version 1.3.1).

This directory contains the following:

  1. samples folder contains sample implementations
    • PGMogaDemo folder contains a sample project that simply writes values out to the html interface
    • PGMogaDemoGame contains a simple game demo that can be controlled using the Moga gamepad
  2. src folder contains source code for the plugin
    • java folder contains native plugin java (native) interface
    • js folder contains native plugin JavaScript interface

You can read more about this sample and see a video of it in action at:

You can’t perform that action at this time.