Get the embed code

Preview the embedded widget

Close
USBJoystick2AnalogKey Demo

USBJoystick2AnalogKey Demo

Poke64738

1,000 - 5,000 downloads

Add this app to your lists
This is a demo to demonstrate the new "Analog-Key" Option of the USB/BT Joystick Center.

Requirements:

- Android 3.2 (or newer) Device with USB Host Port and 1024x600 or higher
- USB/BT Joystick Center app

Gamers:

If you are a Gamer, and you want to play a game that only have the normal "Key mapping" options (or only an on screen touch control), but you want to use "Analog" control of your game character, then ask the developer of the game to insert this easy "Analog-Key" feature (29 lines of code - take a look at the bottom of this description) in his game.

Developers:

If you are a Game-Developer and you want easily support the most of the available Joysticks, then implement a normal "onKey()" function in android to move your screen character (with the possibility of mapping keys to your game interactions) and enhance it with 29 lines of code (the code is at the bottom of this description) to support the new "Analog-Key" Option of my USB Joystick Center. Then the players have full Joystick- and Analog-Control in your game and you don't have to support a bunch of different joysticks.

Background:

Normaly, the Android "onKey()" function has only a "pressed" and "unpressed" state. The "Analog-Key" option solution is an easy addon that works with every joystick and adds a "strength" value (0...64) from the joystick to the normal Android "onKey()" function.

Supported Emulators/Games (alphabetical order):

- Mupen64Plus, Android Edition (AE)
- FPSe
(more soon, I've contacted some Developers, so stay tuned)

How To:

1. Download the USB/BT Joystick Center app from the Android Market
2. Open the USB Joystick Center and enable the "A" Switch to "ON"
3. Plug in a Joystick, map the "Stick" to the "DPAD" Keys (Left, Right, ...)
4. Activate "IME" Switch (ON)
5. Leave the USB Joystick Center with the "Back" button
6. Open the USBJoystick2AnalogKey Demo app and move your Stick and enjoy the analog feeling

Hint: Maybe you have to tune the Deadzone on the driver settings screen for a faster analog stick response.

Here is the code (onKey replacement):

@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {

int[] values = getKeyData(keyCode, event);
textInfo.setText("Keycode: " + values[0] + " | Strength: " + values[1]);

move(values);
return false;
}

private int[] getKeyData(int keyCode, KeyEvent event) {

int[] values = {0,0};
int action = event.getAction();

if(keyCode > 255) { // * get analog value (0,1,2,3,...,62,63,64) for the keyCode *

if(action == KeyEvent.ACTION_DOWN) {
values[0]= (int)(keyCode/100);
values[1] = (keyCode-(values[0]*100));
}
else if(action == KeyEvent.ACTION_UP) {
values[0] = (int)(keyCode/100);
values[1] = 0;
}
}
else { // * normal keys: get digital value (0 or 64) for the keyCode *

if(action == KeyEvent.ACTION_DOWN) {
values[0]= keyCode;
values[1] = 64;
}
else if(action == KeyEvent.ACTION_UP) {
values[0]= keyCode;
values[1]= 0;
}
}
return values;
}

Market: tablet app wireless x360 xbox wired atari vcs 2600 emulator c64 frodo keyrah amiga buzz drums guitar fpse ps3 sixaxis controller wlan wifi bluetooth shadowgun nintendo 64 N64 n64oid super mario cart logitech wheel android tf101 tf201 asus transformer prime xoom wii games psp nes snes uae samsung motorola acer msx pce gbc sega ColecoVision TurboGrafx TG16 Gameboy color shadowgun pes 2012 fifa riptide gp duke nukem 3d modern combat asphalt 6 adrenaline hd samurai madden nfl assassin’s creed boulder dash call of duty

Tags: usb/bt joystick center apk, usb bt joystick center apk free, usb bt joystick center apk, joystickcenter.apk, usb bt joystick center apk download, usbjoystick2analogkey, usb/bt joystick center free, usb/bt center, asphalt 6 adrenaline full apk motorola, usb/bt joystick center 6 apk full.

Screenshots USBJoystick2AnalogKey Demo:

View bigger - USBJoystick2AnalogKey Demo for Android screenshot
View bigger - USBJoystick2AnalogKey Demo for Android screenshot

Comments and ratings for USBJoystick2AnalogKey Demo


  • There aren't any comments yet, be the first to comment!