Skip to content

BlueCodeSystems/opensrp-client-fp

 
 

Repository files navigation

JitPack Latest Build for latest tag (v2.2.0) master-SNAPSHOT

OpenSRP Client Family Planning (BlueCode Fork)

Maven Central License Android

A modernized Android library for Family Planning functionality in OpenSRP applications, maintained by BlueCode Systems.

About This Fork

This is a BlueCode Systems maintained fork of the original OpenSRP Family Planning library, updated for modern Android development with:

  • Android Gradle Plugin 7.4.2 compatibility
  • Android 12+ (API 31+) manifest compliance
  • Maven Central publishing support
  • Updated dependencies with BlueCode replacements
  • Build system modernization and stability fixes

Installation

Gradle (Kotlin DSL)

implementation("io.github.bluecodesystems:opensrp-client-fp:2.2.0")

Gradle (Groovy DSL)

implementation 'io.github.bluecodesystems:opensrp-client-fp:2.2.0'

Key Dependencies

This library uses modernized BlueCode Systems dependencies:

  • MaterialEditText: io.github.bluecodesystems:materialedittext:3.1.6
  • OpenSRP Client Utils: com.github.BlueCodeSystems:opensrp-client-utils:v1.0.0
  • CircleProgressBar: com.github.BlueCodeSystems.Opensrp-client-native-form-new:circleprogressbar:v3.2.2

Features

  • Family Planning Forms: JSON-based dynamic form rendering
  • Client Registration: FP client registration and management
  • Visit Management: Support for FP visits and encounters
  • Data Sync: Integration with OpenSRP server synchronization
  • Advanced Search: Client search functionality
  • Modern UI: Updated Material Design components
  • Android 12+ Compatible: Full support for latest Android versions

Requirements

  • Minimum SDK: API 21 (Android 5.0)
  • Target SDK: API 33 (Android 13)
  • Compile SDK: API 33
  • Java Version: 8+
  • Android Gradle Plugin: 7.4.2+

Build Configuration

Android Gradle Plugin 7.4.2+

This library requires AGP 7.4.2 or higher. Update your build.gradle:

dependencies {
    classpath 'com.android.tools.build:gradle:7.4.2'
}

Android 12+ Manifest

Ensure your app manifest includes proper android:exported declarations:

<activity
    android:name=".MainActivity"
    android:exported="true">
    <!-- Your intent filters -->
</activity>

Migration from Original Library

If migrating from the original OpenSRP Family Planning library:

  1. Update Maven coordinates:

    // Old
    implementation 'org.smartregister:opensrp-client-fp:x.x.x'
    
    // New
    implementation 'io.github.bluecodesystems:opensrp-client-fp:1.0.1'
  2. Update imports (if needed):

    // Package names remain the same
    import org.smartregister.fp.common.library.FPLibrary;
  3. Verify dependencies: Remove old SNAPSHOT dependencies that may conflict

Version History

v2.2.0 (Latest)

  • ✅ Adds OAuth-ready configuration by surfacing client credentials and login activity hooks in the reference app
  • ✅ Cleans up SQLCipher packaging conflicts and overrides problematic time-change resources from upstream dependencies
  • ✅ Removes legacy storage permissions and enables core library desugaring for modern API support
  • ✅ Aligns BlueCode artifacts with JitPack coordinates for more reliable dependency resolution

v2.1.0

  • ✅ Introduced pagination controls and refreshed due filter visuals for the register UI
  • ✅ Updated build tooling to AGP 8.2.2 / Gradle 8.6 with Java 17 support and refined lint/test configuration
  • ✅ Upgraded EventBus and JaCoCo versions while tightening manifest exported flags
  • ✅ Polished Maven publishing pipeline for Central and JitPack consumption

v2.0.0

  • ✅ Modernized build system with AGP 7.4.2
  • ✅ Android 12+ manifest compatibility
  • ✅ Updated to BlueCode maintained dependencies
  • ✅ Maven Central publishing ready
  • ✅ Resolved all compilation errors
  • ✅ Reference app build fixes

Development

Building the Library

# Build library
./gradlew :opensrp-fp:assembleRelease

# Run tests
./gradlew :opensrp-fp:testDebugUnitTest

# Build reference app
./gradlew :reference-app:assembleRelease

Maven Central Publishing

# Generate signed bundle for Maven Central
./gradlew :opensrp-fp:zipCentralBundle -PcentralBundle=true -PcentralRelease=true -PuseGpgCmd=true -PVERSION_NAME=2.2.0

# Bundle location: opensrp-fp/build/distributions/central-bundle-opensrp-client-fp-2.2.0.zip

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes and test thoroughly
  4. Commit with descriptive messages: git commit -m "feat: add new feature"
  5. Push to your fork: git push origin feature/my-feature
  6. Create a Pull Request

License

Copyright 2023 BlueCode Systems

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Support

Acknowledgments

  • Original OpenSRP development team
  • BlueCode Systems engineering team
  • OpenSRP community contributors

Maintained by BlueCode Systems | Based on OpenSRP

About

Reference Family Planning module

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 100.0%