PartySample is a sample Android application with the PlayFabParty library integrated into it. Its purpose is to demonstrate the main functional capabilities provided by the PlayFabParty API.
Note: a registered PlayFab title is required to use PartySample app. Please refer to corresponding documentation.
Please use the latest Android Studio. If you run into any issues, please refer to the FAQ before filing a GitHub Issue.
-
Download
PlayFabParty.Android.Release.zip
(previouslylibparty-android-release.zip
) from one of the PlayFab Party GitHub repository releases. -
Unzip the contents of the downloaded archive directly into
<REPO ROOT>/android/bin/release/
. -
In Android Studio, open a project, navigate to your cloned repository and select
<REPO ROOT>/android/PartySample/
. -
After the project has opened, run
Gradle Sync
in Android Studio. -
Navigate to
Build > Select Build Variant
. In the sidebar that opens, change theActive Build Variant
for:demo
tofullRelease
. -
Navigate to
Build > Make Project
. You should see both the Java and C++ builds kickoff. You should see the following text if the build was successful.BUILD SUCCESSFUL in xm xxs 29 actionable tasks: 29 executed
-
In the top right, select the device you wish to deploy the
PartySample
app to. Navigate toRun > Run 'demo'
.a. You may run into the following error:
Error: The apk for your currently selected variant cannot be signed. Please specify a signing configuration for this variant (<build-variant>).
If you have a
signingConfig
you'd like to use, you may do so. Otherwise, you can just select theFix
button. That will add asigningConfig
line to yourbuild.gradle
that looks like this:signingConfig signingConfigs.debug
. DO NOT CHECK THIS LINE INTO YOUR PRODUCTION APPLICATIONS.After you're clicked
Fix
and you've confirmed the line has been added, you can run the application again. -
If everything has gone well, you should see the application pop up on your device asking for permissions!
As the PartySample app starts on your Android device it will show a screen asking you to provide a PlayFab title ID and select a sample user. Please provide the required information and tap "Login".
On the subsequent screen, you can choose your desired room number, language, and then Create
, Join
or Leave
to get in and out of party rooms with other users.
The application is designed to demo PlayFabParty's voice, transcription and translation capabilities. Chat with your friends and then dig into the code to see how it's done!
Good luck!
-
If you see an error similar to this:
Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 6.6. Possible solution: - Upgrade Gradle wrapper to 7.2 version and re-import the project
Navigate to
Android Studio > Settings > Build, Execution, Deployment > Build Tools > Gradle
and change the Gradle JDK to version 1.8. You may need to download it.After you have changed the Gradle JDK to version 1.8, run
Gradle Sync
again and verify that the error has disappeared.