Skip to content

Playfinity/playfinity-starter-android

Repository files navigation

Playfinity Starter Android (Football and Smartball)

This sample application is designed to assist customers in getting started with Playfinity hardware, including Smartball and Football.

Playfinity.com ✔️ Facebook ✔️ Instagram ✔️ Youtube

Setup

Compatibility 🔄

This application targets Android SDK 21 (Lollipop) and newer. To successfully discover Playfinity devices make sure that your device supports Bluetooth Low Energy (BLE).

Tip

Android SDK configuration can be found in root build.gradle file.


What's included 🚀

  • Support for Football
  • Support for Smartball
  • Listening and reacting to console events and raw data
  • Coded in Kotlin

Preview

Screens

starter

How to use

Setup

AndroidManifest.xml

<meta-data
    android:name="io.playfinity.sdk.applicationKey"
    android:value="SAMPLE_TEST" />
<meta-data
    android:name="io.playfinity.sdk.developerId"
    android:value="SAMPLE_TEST" />
<meta-data
    android:name="io.playfinity.sdk.apiUrl"
    android:value="https://apps.playfinity.io" />
<meta-data
    android:name="io.playfinity.sdk.cloudApiUrl"
    android:value="https://cloud.playfinity.io" />

Console mode (Smartball)

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.device.SensorType.Ball)

Tip

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

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.

License

Copyright 2024 Playfinity.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Record raw data from your Playfinity console.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages