Skip to content

madzalo/dhis2-app-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11,068 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHIS2 Android Capture App - Auto-Login Edition

Lines of Code Reliability Rating

A customized version of the DHIS2 Android Capture App with automatic login capabilities via deep links and intent extras.

🎯 What is this repository for?

This is a fork of the official DHIS2 Android Capture App that adds auto-login launcher support, enabling:

  • Seamless authentication via deep links
  • Intent-based credential passing from launcher apps
  • URL-encoded parameter support for special characters
  • Automatic server validation and login flow

Perfect for organizations that need to launch the DHIS2 app with pre-configured credentials from custom launcher applications.

✨ Key Features

🚀 Auto-Login Support

Launch the app with credentials automatically filled and authenticated:

Via Intent Extras:

adb shell am start -n com.dhis2/org.dhis2.usescases.login.LoginActivity \
  --es server_url "https://your-dhis2-server.com" \
  --es username "your_username" \
  --es password "your_password"

Via Deep Links:

dhis2://login?server_url=https://your-dhis2-server.com&username=your_username&password=your_password

🔐 Security Features

  • Automatic URL decoding for special characters in passwords
  • Secure credential handling through DHIS2 SDK
  • Support for all password special characters: ! @ # $ % ^ & * ( ) - _ = + [ ] { } ; : ' " , . < > / ? | \ ~

🛠️ Integration Support

Perfect for:

  • Custom launcher applications
  • MDM (Mobile Device Management) solutions
  • Automated testing and deployment
  • Single sign-on (SSO) integrations

📦 Installation

Download Release APK

Download the latest signed APK from Releases

Install via ADB

adb install dhis2-v3.3.1-googlePlay.apk

🔧 Building from Source

Check the Wiki for information about how to build the project and its architecture.

Quick Build

# Debug build
./gradlew :app:assembleDhis2Debug

# Release build (requires signing keys)
SIGNING_KEYSTORE_PATH="path/to/keystore.jks" \
SIGNING_KEY_ALIAS="your_alias" \
SIGNING_KEY_PASSWORD="your_key_password" \
SIGNING_STORE_PASSWORD="your_store_password" \
./gradlew :app:assembleDhis2PlayServicesRelease

📱 Usage Examples

From Android Code

val intent = Intent().apply {
    component = ComponentName("com.dhis2", "org.dhis2.usescases.login.LoginActivity")
    putExtra("server_url", "https://play.dhis2.org/demo")
    putExtra("username", "admin")
    putExtra("password", "district")
}
startActivity(intent)

From Deep Link

val deepLink = "dhis2://login?server_url=https://play.dhis2.org/demo&username=admin&password=district"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(deepLink))
startActivity(intent)

With Special Characters in Password

Passwords with special characters are automatically URL-encoded and decoded:

dhis2://login?server_url=https://server.com&username=user&password=Pass%40word%21123

Decodes to: Pass@word!123

🔄 Updates and Maintenance

This fork is based on DHIS2 Android Capture App v3.3.1 and includes:

  • Latest upstream features and bug fixes
  • Custom auto-login modifications
  • Enhanced URL parameter handling
  • Compose Multiplatform UI compatibility

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

Same license as the upstream DHIS2 Android Capture App.

🔗 Links

📧 Contact

For issues related to the auto-login functionality, please open an issue in this repository.

About

DHIS2 Android Capture App with custom auto-login launcher support via deep links and intent extras

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages