How to create a Playfinity Android app

The process of making an Android app on the Playfinity Framework is quite simple.

You just download the framework, then open the project in Android Studio, build it and run it.

Download the framework

The Playfinity Framework is available on GitHub. You can download it from here.

What is included?

  • Playfinity SDK embedded
  • Playfinity console discovering and pairing (BLE)
  • Listening and reacting to console events
  • Sounds
  • Ball throwing sample
  • Trampoline jumping sample
  • Trick ball sample
  • Cloud transporter
  • Coded in Kotlin

Screenshots

Sample app screenshot with successfully connected SDK and Playfinity Console (real device photo)
Sample app screenshot with successfully connected SDK and Playfinity Console (real device photo)

Requirements

This application targets Android (5.0) Lollipop and newer.

To successfully discover Playfinity Console make sure that your device supports Bluetooth Low Energy (BLE).

Console modes

Playfinity Console can operate in a several different modes. For example it can act like a ball or a trampoline ankle band.

While initializing Playfinity SDK we can choose what mode to use:

PlayfinitySDKBuilder().enableLogging(BuildConfig.DEBUG).addCallback(this).build(this, io.playfinity.sdk.core.device.SensorType.Ball)

Please note that the console will produce different events io.playfinity.sdk.core.device.SensorEventType while working under specific mode.

Build variants

1. typeBall

Puts the console into Ball mode.
Events: Throw, Catch, Miss.

2. typeTrampoline

Puts the console into Trampoline mode.
Events: Jump, Land.

3. typeTrix

Puts the console into Football mode, to provide football-like experience.
Events: Kick, Bounce, Miss.

In addition to the events, properties like height, speed, time of flight etc, are delivered.