Skip to content

About

🤬 Android application with a simple test to assess the level of affective polarization in people.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Castas logo

Castas for Android

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

About

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.

How to use

  1. Open Castas and choose Português, English, or Español from the language menu. The app starts in Brazilian Portuguese.
  2. 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.
  3. 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.
  4. 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.

Understand your result

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% 🤬🤬🤬🤬🤬

Inside the project

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

Install on Android

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.

Run from Android Studio

  1. Open the repository root in Android Studio and follow the build prerequisites.
  2. 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.
  3. Select the device and the app run configuration, then press Run. Android Studio builds and installs Castas.

Install the APK with ADB

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.apk

Replace 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.

Build and test

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:bundleRelease

Use 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.

Data Privacy

  • 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.

License

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 🤖.

About

🤬 Android application with a simple test to assess the level of affective polarization in people.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages