Repository inventory

pluginagentmarketplace/custom-plugin-android

Skills indexed from this repository, with install-style signals scoped to the repo.
2 skills2 GitHub stars0 weekly installsPythonGitHubOwner profile

Overview

This skill helps Android developers implement robust networking using Retrofit and OkHttp, including JSON serialization and network security patterns. It focuses on type-safe API interfaces, efficient HTTP client configuration, and secure transport practices to reduce runtime errors and vulnerabilities. Use it to standardize API calls, error handling, and performance tuning in mobile apps.

How this skill works

The skill inspects common networking tasks: defining Retrofit service interfaces, configuring OkHttp clients, and setting up JSON converters (Gson, Moshi). It highlights interceptors, timeouts, certificate pinning, and secure token management to enforce HTTPS and validate certificates. Error handling patterns and result wrappers are provided to surface success and failure states cleanly to callers.

When to use it

  • Building or refactoring Android REST API clients with Retrofit
  • Configuring OkHttp for logging, timeouts, and certificate pinning
  • Adding JSON serialization and mapping between DTOs and domain models
  • Implementing centralized error handling and retry policies
  • Hardening app networking with HTTPS and secure token storage

Best practices

  • Always use HTTPS and validate certificates; prefer certificate pinning for high-risk apps
  • Centralize API definitions with Retrofit interfaces and use suspend functions for coroutines
  • Use a JSON converter (Gson/Moshi) and map DTOs to domain models to isolate parsing logic
  • Add OkHttp interceptors for logging, authentication headers, and performance metrics
  • Return a sealed Result type or wrapper to unify success and error flow across layers
  • Cache responses and compress payloads to reduce bandwidth and improve perceived performance

Example use cases

  • Define a UserApi Retrofit interface and implement get/create endpoints with suspend functions
  • Configure OkHttp with logging, 30s timeouts, and a certificate pinner for production builds
  • Wrap network calls in a Result sealed class and handle exceptions at the repository layer
  • Switch JSON converters or add custom adapters to handle dates and polymorphic types
  • Implement token refresh with an OkHttp authenticator and retry failed requests automatically

FAQ

Choose Moshi for modern features and smaller footprints; use Gson if you rely on legacy behavior or existing code. Both integrate with Retrofit via converter factories.

When should I enable SSL pinning?

Enable pinning for high-security apps (finance, health) to reduce MITM risk, but plan for certificate rotation and fallback to avoid locking out users.

2 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational