5,597,084 Members 45,419 Now Online
XDA Developers Android and Mobile Development Forum

[APP][2.3.3+] MOGA Universal Driver

Tip us?
 
ObsidianX
Old
(Last edited by ObsidianX; 9th June 2013 at 12:01 PM.) Reason: added instructions
#1  
Member - OP
Thanks Meter 239
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
Default [APP][2.3.3+] MOGA Universal Driver



Use your PowerA MOGA with any application!

Provides full functionality for the PowerA MOGA™ Pocket and Pro controllers.

This application includes both a Virtual Keyboard that should work on all devices and a Gamepad Mode that provides full gamepad functionality for rooted devices.

NOTE: Only supports one controller at a time!

Features:
* Virtual Keyboard
* Virtual Gamepad
* Customizable profiles so you can make it work just right with your game or emulator
* Exportable profiles
* MOGA device management
* Button to stop Pivot services (Root users only, non-root get taken to the Settings application to do it manually, sorry!)
* Two Home-screen widgets:
** Small toggle widget
** Long toggle widget with profile switcher

Virtual Keyboard Features:
* Does not require root
* Usable by any application that listens for keyboard input
* Customizable!

Virtual Gamepad Features:
* Acts like a full Gamepad
* Toggle the analog joysticks between digital and analog output depending on your needs
* Customizable!

Usage:

1. Select your device:

I'm going to assume you haven't already paired your controller with your phone. Skip to the end of the section if you've already got it paired.

Make sure Bluetooth is enabled before continuing!

Select the "Manage Controllers" button found at the top of the Settings application. You will see an empty list of paired controllers.

Power on your Pocket or, if you have a Pro, turn it on into Mode A. Select "Add Controller" at the bottom of the screen. Your phone will start scanning for controllers and will add only MOGA devices to the list as it finds them. Once the scan completes select the controller you wish to pair with and click the "Select" button. It will begin the pairing process with your controller and you will most likely see a dialog pop up that asks you to confirm a PIN. Accept the PIN and the "Add Controller" screen will close, dropping you back to the "Manage Devices" screen. Click back once more unless you wish to repeat this step to add another controller.

2. Running in Virtual Keyboard mode:

This is the default mode for the driver but does require a few steps to configure.

Scrolling down to the "Driver Mode" section on the main screen you'll see that the current mode for the driver is "Virtual Keyboard" (unless you've already changed it to Gamepad, in which case switch back to Virtual Keyboard to follow these instructions). Click on the "Configure Virtual Keyboards" button to be taken directly to the appropriate Settings screen to turn on the "MOGA Virtual Keyboard" this cannot be done automatically for security reasons which are explained when you turn on the MOGA Virtual Keyboard. After you've enabled it go back to the driver's Settings screen and click "Select Virtual Keyboard". This will pop up the system dialog to let you choose which keyboard you want to be the active one. This also cannot be done automatically, sorry!

Finally toggle the button next to "Enable Driver" to turn on the driver. You'll see a MOGA icon appear in your notifications bar indicating the status of the driver: white for disconnected, green for connected.

If you'd like to configure a profile scroll down to the "Configuring a Profile" section below!

3. Running in Virtual Gamepad mode:

Before you continue: you must have a rooted device with SuperUser installed in order to use the Virtual Gamepad mode. The button to enable the Virtual Gamepad is disabled if your device does not support SuperUser.

Virtual Gamepad mode is significantly easier to configure. First, click on the "Switch" button next to the current mode which will pop up a dialog box explaining the two available modes. Feel free to read these before continuing. Select Gamepad from the list and you've successfully configured Gamepad mode!

All you have to do next is enable the driver by toggling the "Enable Driver" button just as you would in the Virtual Keyboard mode.

4. Configuring a Profile:

The profile system was entirely rewritten in 3.0 to make the process easier and to provide the ability to share profiles with friends. If you scroll down to the bottom of the settings page you'll see the "Profiles" section with a couple of buttons. Clicking "Switch" will popup a dialog containing all of the valid profiles for the current controller type and driver mode (for example, you cannot use a MOGA Pocket profile that was configured for Virtual Keyboard mode on a MOGA Pro in Gamepad mode, with any variation therein).

Selecting "Manage Profiles" will bring you to a list similar to the "Manage Controllers" screen. Here you can create new profiles, rename them, delete them, or reload them from the SD card if you've added new ones onto your SD card while the program was running.

Click "Create Profile" to begin. You will first be prompted with a dialog that asks for the name of the profile. Enter what you'd like and click OK. You will then be presented with the default configuration for that profile. You can modify any of the mappings by clicking on the "Change" buttons associated with each input. When you click "Change" a dialog box will appear with a sorted list of output types. Select a type and then select the button you wish to map to that input. Changes are saved when you leave the edit page.

If you are running in Virtual Gamepad mode you will have a few more options available to you. You can decide whether or not the Analog inputs (including the DPad) should send Analog outputs or standard Button outputs. The list will automatically update when you toggle the analog mode so scroll down afterwards to configure the outputs. Gamepad mode will not present you with a list of categories as the options are much more limited. Since it is pretending to be a controller it can only send controller messages to the system. For any analog input you will only be allowed to map analog outputs and for buttons, only button outputs.

After creating a profile click the "Switch" button to select your profile and activate it!

Profiles are automatically saved to "/sdcard/MOGA/IME" for Virtual Keyboard mode and "/sdcard/MOGA/System" for Virtual Gamepad mode.

Troubleshooting:

Lots of users have reported that the driver does not properly connect on certain devices (I'm noticing most are Samsung TouchWiz-enabled devices). I am still actively investigating this and will hopefully be able to resolve it sooner rather than later!

* Make sure that the Pivot is NOT running when you run my driver! It will connect to the controller and prevent my driver from connecting. There is a button at the bottom of the settings screen that will help you ensure Pivot isn't running.
* If you turn on your MOGA Pocket and the light immediately turns green then turn it off and back on until the blue light blinks consistently. I've noticed on my own that this happens almost every time I turn it on after a long period of not using the controller.
* Some users have reported that disabling WiFi has allowed them to connect their controllers.
* There is a bit of voodoo that one user found that helped them connect to their controller on a Samsung device:
Quote:
Originally Posted by jjprophet View Post
I was having the same problem on my Note 2 also. The only way I've been able to connect to this MOGA Universal Driver app is by connecting first to the MOGA Pivot app then starting the Universal Driver and then turning my phones screen off for about a second then turning it back on. For whatever reason after turning my screen back on it instantly connects to the Universal Driver app.
Download:

Google Play

This product is not affiliated with, nor authorized, endorsed or licensed in any way by Bensussen Deutsch and Associates, Inc., its affiliates or subsidiaries. All trademarks are property of their respective holders.

Buy me a soda!
The Following 61 Users Say Thank You to ObsidianX For This Useful Post: [ Click to Expand ]
 
ObsidianX
Old
(Last edited by ObsidianX; 9th June 2013 at 12:00 PM.)
#2  
Member - OP
Thanks Meter 239
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
Changelog:

3.1:
Brought back the widgets!
New, long widget: change profiles from your desktop
Fixed a few more crashes reported by users. Keep 'em coming -- but hopefully not!

3.0.3:
Rewrote connection code. Works on my devices that previously didn't. Please try!
Fixed "Enable Bluetooth" bug where it was out-of-sync with Bluetooth Adapter state
Added dialog when enabling driver to warn you if Pivot is detected to be running
Fixed Pivot detection and stopping code to include all Pivot packages
Moved SuperUser check from Application to Settings Activity to prevent it from popping up all the time

3.0.2:
Added Spacebar and the Numpad numbers to the Virtual Keyboard mappable keys
Fixed some crashes users had reported
Removed old WAKE_LOCK permission
Fixed "Stop Pivot Services" button

3.0.1:
Fixed crash on older devices due to a typo when discovery started
Fixed Left stick's Right being mapped to DpadUp by default (Pocket)
Fixed Left/Right shoulder buttons being flipped (Pro/Pocket)

3.0:
Completely rewritten!
Supports MOGA Pro
Profiles are saved as XML files on the SD card for easy sharing

2.2:
Fixed crash (So sorry for the broken update!)

2.1:
Added System Service toggle widget
Split Analog/DPad toggle into two options to have one DPad one Analog

2.0:
Completely rewritten to improve lag time.
System-mode added.
Analog support now available in System-mode.
Analog can be toggled to allow DPAD use.
Notification icons change according to connection status.

1.1:
KeyEvents are now broadcast as JOYSTICK and GAMEPAD sources.

1.0:
First release!
The Following 8 Users Say Thank You to ObsidianX For This Useful Post: [ Click to Expand ]
 
e4xda
Old
#3  
e4xda's Avatar
Member
Thanks Meter 7
Posts: 42
Join Date: May 2009
Great work on the app, thank you very much!

Is there anyway to get the device to present itself as a generic gamepad, similar to a dualshock and the six axis app?
 
ObsidianX
Old
#4  
Member - OP
Thanks Meter 239
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
I could send KeyEvents as a Gamepad and Joystick source but I don't know if that's what you're talking about. Whenever I've used gamepads on my devices they always come in through KeyDown and GenericMotion events.
 
Thwiipp
Old
#5  
Junior Member
Thanks Meter 3
Posts: 28
Join Date: Oct 2008
Awesome work man, Ive done a little testing so far. Works great with Sonic CD, and Mame4Droid, but i cant get it to work in Gameboid for some reason, probably the same in the other iod emulators, haven't tested those yet. so far hasn't worked in any of the other android native games ive tried. will continue my tests.
 
ObsidianX
Old
#6  
Member - OP
Thanks Meter 239
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
Quote:
Originally Posted by Thwiipp View Post
Awesome work man, Ive done a little testing so far. Works great with Sonic CD, and Mame4Droid, but i cant get it to work in Gameboid for some reason, probably the same in the other iod emulators, haven't tested those yet. so far hasn't worked in any of the other android native games ive tried. will continue my tests.
I tried it on SNESoid and GameBoid and in both cases I needed to enable "Use Input Method" in the "Other Settings" menu in order for it to work. It would appear that the emulators don't listen to soft-key events if this is off.
 
e4xda
Old
#7  
e4xda's Avatar
Member
Thanks Meter 7
Posts: 42
Join Date: May 2009
Quote:
Originally Posted by ObsidianX View Post
I could send KeyEvents as a Gamepad and Joystick source but I don't know if that's what you're talking about. Whenever I've used gamepads on my devices they always come in through KeyDown and GenericMotion events.
Sort of, yes. I tried the updated version of the app (think you for putting it out there) but it wasn't quite what I was trying to describe.

This is what I'm after and the only real example I have to describe what I'm talking about.
If you use the sixaxis app has an option in it to "Enable Gamepad: Android will see controllers as native gamepads."

When this option is enabled, games like Dead Trigger will give you an in-game menu to map the controller buttons.

Again, thank you VERY much for your work on this. As is, it makes the MOGA useable!

---------- Post added at 05:12 PM ---------- Previous post was at 05:04 PM ----------

Quote:
Originally Posted by ObsidianX View Post
I could send KeyEvents as a Gamepad and Joystick source but I don't know if that's what you're talking about. Whenever I've used gamepads on my devices they always come in through KeyDown and GenericMotion events.
Sort of, yes. I tried the updated version of the app (thank you for putting it out there) but it wasn't quite what I was trying to describe.

This is what I'm after and the only real example I have to describe what I'm talking about.
If you use the sixaxis app has an option in it to "Enable Gamepad: Android will see controllers as native gamepads."

When this option is enabled, games like Dead Trigger will give you an in-game menu to map the controller buttons.

Again, thank you VERY much for your work on this. As is, it makes the MOGA useable!

If there's anything I can do to help (screenshots, testing, etc) please don't hesitate to ask.
 
2mato
Old
#8  
2mato's Avatar
Junior Member
Thanks Meter 0
Posts: 12
Join Date: Oct 2012
I download this app but did not work on my device, any idea's?
 
ObsidianX
Old
#9  
Member - OP
Thanks Meter 239
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
Thanks for the feedback!

I did some more reading and found that the Android framework provides absolutely no way to simulate analog input for normal applications. System applications are allowed to send Touch and Trackball events but not the GenericMotionEvent that gamepads send for analog inputs, and even if it did I'm not a system application. The only way to make it work is to elevate the driver to superuser status and start messing with the system directly. This works out well for what e4xda is asking for too because I will be forced to make the device act as a system-level joystick in order to get the analog inputs working.

What I'm planning on doing is having a toggle for which mode to run the driver in, IME or Gamepad. IME mode will be what you see now. In Gamepad mode the user will have to grant the driver root access (which restricts this mode to rooted devices) so it can broadcast inputs directly to the kernel. A nice side-effect of using it in Gamepad mode would mean you wouldn't have to switch your IME back and forth whenever you wanted to use the MOGA.

Anywho, sorry for getting technical. It's partly for you to stay in the loop and for me to formalize what's in my head
 
ObsidianX
Old
#10  
Member - OP
Thanks Meter 239
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
Quote:
Originally Posted by 2mato View Post
I download this app but did not work on my device, any idea's?
I'm afraid I can't really help you out without more info. When you say it doesn't work what exactly do you mean?

In its current form the driver is kind of a song and dance to get going. You'll need to enable it in the system Keyboard and Language settings and then switch to the MOGA IME (which can be done inside the IME settings page). After that you need to configure the IME by selecting which device it should connect to. If you haven't already paired the device you can do that from the settings page. Once you've selected a device go ahead and leave the IME settings page and it should try and connect to your device. Make sure your MOGA is turned on and wait for the light on the PowerA button to turn Green. This will take 5 - 10 seconds on average.

Sometimes my MOGA will turn green immediately for some reason when turning it on even though the phone hasn't connected to it. In those cases just power cycle the MOGA until it connects properly to your phone.

The Following 3 Users Say Thank You to ObsidianX For This Useful Post: [ Click to Expand ]
Tags
ime, moga
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes