Affective Polarization Test
Reflect on how political disagreement shapes the way you see and relate to others.
Android 8.0+ · Works offline · Português · English · Español
How to use · Install on Android · Build and test · Privacy · Web version
Castas brings the original web questionnaire to phones and tablets as a native Android app. Its 40 questions explore affective polarization, the way political differences can turn into distrust, hostility, and social distance. When people come to see opposing groups as morally incompatible, those divisions can harden into informal castes.
Each score summarizes your answers in one dimension, giving you a starting point for reflecting on those attitudes.
- Open Castas and choose Português, English, or Español from the language menu. The app starts in Brazilian Portuguese.
- Tap Iniciar Teste (Start Test in English). Choose one of four answers per statement. The app advances automatically and shows progress both within the current dimension and across all 40 questions.
- After the last question, read the five percentages and the 5 × 5 emoji grid. Tap Alterar Emoji (Change Emoji) to search for a replacement for the blue heart.
- To share, tap Compartilhar (Share). Castas copies the grid, percentages, and web test link to the Android clipboard. Paste the text into the app of your choice.
You can rotate the screen during the test and keep your place. If you leave the questionnaire or Android ends the app process before you finish, the unfinished answers are discarded. The most recent completed result remains available under Ver Resultado (View Result) on the home screen.
| Dimension | What the questions explore |
|---|---|
| Emotional Hostility | Irritation and negative reactions to people in opposing political groups |
| Moral Devaluation | Judging political opponents as ignorant, dishonest, or malicious |
| Social Distance | Discomfort with close relationships across political groups |
| Democratic Delegitimization | Seeing the opposing group as a threat to democracy or rejecting its political legitimacy |
| Identity Segregation | Staying within social and media circles that reinforce your political identity |
Each dimension contains eight questions. The four answers are worth 3, 2, 1, and 0 points in order from strong agreement to strong disagreement. Castas divides the dimension total by 24, multiplies by 100, and rounds to the nearest whole percentage. A higher percentage reflects more agreement with the statements in that dimension.
Each grid row represents one dimension. The default emoji pattern follows these ranges.
| Score | Row |
|---|---|
| 0% | 💙💙💙💙💙 |
| 1–24% | 💙💙💙💙🤬 |
| 25–50% | 💙💙💙🤬🤬 |
| 51–74% | 💙💙🤬🤬🤬 |
| 75–99% | 💙🤬🤬🤬🤬 |
| 100% | 🤬🤬🤬🤬🤬 |
| Area | Technology |
|---|---|
| Screens and navigation | Kotlin, Jetpack Compose, Material 3, Navigation Compose |
| Questionnaire state and local storage | Android ViewModel and Preferences DataStore |
| Emoji rendering | Bundled AndroidX EmojiCompat font and a native searchable picker |
| Build and verification | Android Gradle Plugin, Android Lint, JUnit, and Compose instrumented tests |
app/src/maincontains the app, scoring logic, translations, and resources.app/src/testandapp/src/androidTestcontain JVM and device tests.- OpenSpec tracks the questionnaire and release requirements. The UI guide and closing audit record the Android decisions and test evidence.
Castas runs on phones and tablets with Android 8.0 Oreo (API 26) or newer. To try the repository version, run it from Android Studio or install the debug APK on your device.
- Open the repository root in Android Studio and follow the build prerequisites.
- In Device Manager, start an Android emulator. For a physical device, enable USB debugging in Developer options, connect a data cable, and accept the debugging prompt on the device.
- Select the device and the
apprun configuration, then press Run. Android Studio builds and installs Castas.
After setting up the SDK and JDK, run the following commands from the project root. They assume Android SDK Platform-Tools are on your PATH.
./gradlew :app:assembleDebug
adb devices -l
adb -s DEVICE_SERIAL install -r app/build/outputs/apk/debug/app-debug.apkReplace DEVICE_SERIAL with the serial shown by ADB. Open Castas from the device’s app list. Android can update an existing installation with -r when the signatures match. Uninstalling an existing copy erases its saved result and language preference.
Use JDK 21 for Gradle. Install Android SDK Platform 36, Build-Tools 35.0.0, and Platform-Tools through Android Studio’s SDK Manager. Configure the SDK path in Android Studio or set ANDROID_HOME for command-line builds. The project compiles against and targets API 36. The Gradle wrapper pins version 8.11.1 and verifies its distribution checksum.
./gradlew :app:assembleDebug :app:testDebugUnitTest :app:lintDebug
ANDROID_SERIAL=DEVICE_SERIAL ./gradlew :app:connectedDebugAndroidTest
./gradlew :app:lintRelease :app:bundleReleaseUse gradlew.bat on Windows. In PowerShell, set $env:ANDROID_SERIAL = "DEVICE_SERIAL" before running the instrumented test task. Run instrumented tests on a dedicated device or emulator with disposable data. On Linux, run the emulator preflight from the host shell to check acceleration. Pass the ADB serial after boot to check the device and API. Verification results.
The release build produces app/build/outputs/bundle/release/app-release.aab. Use the APK for direct installation. The AAB is for Play distribution and requires an upload signature. Release and Play Console checklist.
- No personal data is collected
- No cookies are used for tracking
- Test results are stored only in your browser's localStorage
- No server-side storage of individual responses
- Users can clear all data by clearing browser storage
The questionnaire runs offline without an account, analytics, or trackers. It keeps the last completed result and preferred language in the app’s private storage. Individual answers stay in memory during the test.
Copying a result places it on the Android clipboard. Pasting it elsewhere shares it with the receiving app. To remove the saved result and reset the language, open Settings → Apps → Castas → Storage and choose Clear storage. You can also read the privacy policy from the Castas home screen.
This project is licensed under the GPL v3.0 License.
See LICENSE for more details.
Copyleft © 2026 Raul Bras 🇧🇷 Published under the GPL v3.0 license.
Made in Brazil, in the Land of Oz (SP) , with 🌭 🍕 and AI 🤖.