This is a basic Android application that demonstrates how to integrate the Steamworks SDK to interface with a Steam account for testing purposes.
- Android Studio - Install Android Studio with NDK support
- Android SDK - Make sure you have the Android SDK installed
- NDK - Install the NDK through Android Studio (SDK Manager)
Edit local.properties and set the path to your Android SDK:
# Windows example:
sdk.dir=C\:\\Users\\YourName\\AppData\\Local\\Android\\Sdk
# Mac/Linux example:
sdk.dir=/Users/YourName/Library/Android/sdkThe app currently uses App ID 480 (Space War - the example game in Steamworks SDK). For your own testing, you can:
- Keep 480 for basic testing (works but limited functionality)
- Change it to your own App ID in:
app/src/main/assets/steam_appid.txtapp/build.gradle.kts(applicationId)
- Open Android Studio
- File > Open > Select the
androidSteamAPIfolder - Wait for Gradle to sync
- Build > Build APK
- Transfer the APK to your Android device
- Install the APK
- Important: Steam must be installed on your Android device
- The app will initialize the Steam API and display:
- Whether Steam is initialized
- Whether Steam is running
- Login status
- Your Steam username
- Your Steam ID
androidSteamAPI/
├── app/
│ ├── src/main/
│ │ ├── assets/ # steam_appid.txt
│ │ ├── cpp/ # Native C++ code
│ │ │ ├── CMakeLists.txt
│ │ │ ├── steam_manager.h
│ │ │ ├── steam_manager.cpp
│ │ │ └── native_bridge.cpp
│ │ ├── java/com/steamtest/app/
│ │ │ ├── MainActivity.kt
│ │ │ └── SteamAPI.kt
│ │ ├── jniLibs/ # Native Steam library
│ │ └── res/ # Android resources
│ └── build.gradle.kts
├── SteamworksSDK/ # Your Steamworks SDK (already included)
├── build.gradle.kts
├── settings.gradle.kts
└── README.md
- Steam Required: The Steam client must be installed on the Android device for the API to work
- App ID: Using App ID 480 will work for basic testing. For full functionality, register your own app on Steam
- arm64-v8a: The app is currently configured for arm64-v8a devices. You can add more ABIs in
app/build.gradle.kts - Testing: This app is for testing purposes. For production, you'll need proper Steam partner account access
- Steam not initialized: Make sure the Steam app is installed and running on your device
- Build errors: Ensure Android SDK, NDK, and CMake are properly installed via Android Studio
- JNI errors: Verify the native library is properly loaded in
SteamAPI.kt
- Steam API initialization
- Get Steam username
- Get Steam ID
- Check login status
- Check persona state (Online, Away, Busy, etc.)
- Refresh button to update information