# Raphael Bernardo

**Senior Android Engineer · iOS & tvOS with SwiftUI**
Ex-Uber (contract) · Kotlin and Jetpack Compose for phone, tablet and TV, native JNI/C++, my own apps on Google Play and the App Store, and applied AI from coding agents to a pay-per-call API for AI agents.

Rio de Janeiro, Brazil (GMT-3) · Brazilian + Portuguese (EU) dual citizen
Languages: Portuguese (native), English (fluent), Spanish (intermediate)
Open to a new engagement.
Offshore B2B contractor from Brazil, invoicing through my own company (CNPJ). Overlaps a full US Eastern working day.
+55 (21) 98885-6697 · raphaelbgr@gmail.com
github.com/raphaelbgr · linkedin.com/in/raphaelbgr

---

## Summary

Senior Android engineer for phone, tablet and TV, with my own iOS and tvOS apps on the App Store and applied AI. Ten-plus years shipping production Android apps — Uber's Maps SDK (JNI/C++), payments and offline-first data, and OTT streaming with 4K DRM-protected playback (Widevine, PlayReady) across Android TV, Fire OS, webOS and Tizen. I build and publish apps for iPhone, iPad and Apple TV in Swift and SwiftUI, and build AI systems end to end: an AI-native workflow with coding agents and automated review, agent orchestration across my own machine fleet, and a live pay-per-call API for AI agents.


---

## Professional Experience

### Nexstar Media Group, Inc. — Senior Fire OS / Android TV Engineer
**Aug 2025 – Present · Contract · Full Remote**

Multi-brand OTT streaming platform framework for Fire TV and Android TV. Android/Fire OS contributor on the platform engineering team; the items below are the areas I worked in, not sole ownership of the platform.

- Contributed to the architecture of an enterprise OTT streaming framework using MVVM + Clean Architecture, with a plugin-based integration system for third-party services.
- Developed 5 specialised Media3 / ExoPlayer implementations for VOD, live streaming, and audio with HLS adaptive bitrate.
- Implemented DRM-protected content streaming (Widevine, PlayReady) with both server-side and client-side ad insertion.
- Integrated the platform's analytics and audience-measurement stack under GDPR / CCPA compliance.
- Built TV-optimised device-based authentication flows.
- Implemented subscription management with entitlement checking and flexible paywall integration.
- Worked on remote configuration enabling zero-downtime feature rollouts across a large multi-brand flavor matrix.
- Created TV-optimised UI using the Android Leanback framework with d-pad / remote-control navigation.
- Refactored callback patterns to reactive event-driven architecture using Kotlin SharedFlow; resolved background-audio playback issues during navigation transitions and lifecycle-aware leaks in fragment navigation.
- Integrated Firebase Crashlytics and New Relic for crash reporting and performance monitoring.
- Wrote unit and UI tests using JUnit, Mockk, Robolectric, and Espresso.
- Run a client-approved agent-driven delivery workflow end to end: an agent picks up the tracker issue with its
  acceptance criteria, works the change on an isolated branch, runs the test suite alongside
  agent-driven end-to-end checks against a running build, and opens a GitHub pull request
  carrying the issue context and test evidence. GitHub Actions runs the pipeline; a second model
  audits the diff against the original request before anything is reported done.

**Stack:** Kotlin, Kotlin Coroutines / Flow, Media3 / ExoPlayer, Dagger 2, Retrofit2, Moshi, Glide, Android Leanback, Jetpack (Navigation, ViewModel, LiveData, StateFlow, SharedFlow, Room), Firebase (Analytics, Crashlytics, FCM), Google IMA SDK, New Relic, JUnit, Mockk, Espresso.

---

### FreeCast, Inc. — Android / Android TV / Fire OS Engineer
**Mar 2021 – Jul 2025 (4 yrs 5 mo) · Contract · Part-time, EST hours · Full Remote**

- Led the full migration of the legacy Java codebase to Kotlin; introduced Use-Case + Clean Architecture and improved end-user UX.
- Implemented HLS / DASH playback for live linear TV and VOD with Widevine DRM-protected streaming.
- Built and maintained the Select TV and FreeCast Watch products across Android, Android TV, Fire OS, webOS and Tizen.
- Enabled Google Cast and integrated a paid subscription gateway.
- Integrated OTA tuner platforms (HDHomeRun, AirTV, Alticast, PDAQ) with GStreamer-based media pipelines for secure live broadcast over HLS / DASH.
- Owned DRM, EPG, tuner orchestration, transcoding, and multi-device streaming end-to-end.
- Shipped on Google Play (Select TV Android, FreeCast Watch) and Amazon Appstore (FreeCast Watch Fire OS).
- Used AI-assisted development on the Java-to-Kotlin migration and on widening test coverage, later with coding agents as a primary development method on migration and refactor work, with automated verification in CI before review.

**Stack:** Kotlin, Jetpack Compose, Hilt, Coroutines / Flow, Media3, Room, DataStore, Retrofit2, Picasso, Firebase Analytics, Firebase Crashlytics, Firebase Cloud Messaging, Mixpanel, webOS, Tizen, HDHomeRun, AirTV, Alticast, PDAQ, GStreamer, Widevine DRM, JUnit, Espresso.

---

### Claro TV+ — Android TV / Fire OS Engineer
**Apr 2024 – Dec 2024 (8 mo) · Freelance via Global Hitss · Part-time · Full Remote**

- Greenfield Android TV / Fire OS app for one of Brazil's largest pay-TV operators.
- Implemented 4K streaming via DASH / HLS protocols with multi-DRM.
- Contributed to the data layer as a shared Kotlin Multiplatform (KMP) submodule consumed by Android, webOS and Tizen clients.
- Multi-module MVVM architecture; Bitmovin Player playback; analytics across Firebase + Google Analytics 4.
- Applied AI-assisted development across the greenfield build — code generation and review over
  the Kotlin Multiplatform and multi-module layers.

**Stack:** Kotlin Multiplatform (KMP), Kotlin, Bitmovin Player, Ktor, Koin, Coroutines / Flow, Jetpack, Firebase, Google Analytics 4, webOS, Tizen, JUnit, Espresso.

---

### Uber Technologies — Android Engineer, Maps SDK team
**May 2021 – May 2022 (1 yr) · Contract via Matchpoint Solutions · PST hours · Full Remote**

- Worked on the Maps team SDK module developed with JNI / C++.
- Worked in Uber's RIBs architecture inside the internal monorepo (not the public repository).
- Collaborated on global-scale projects across a 10K+ engineer codebase.
- Shipped to Uber Rider, Uber Eats and Uber Driver apps.

**Stack:** Java, Kotlin, Groovy, C++, Python, SQL, Android SDK, NDK, JNI, RIBs, Buck, CMake, Flipper, Firebase, custom logger / analytics / crash reporter, JUnit, Espresso.

---


### Super Revendedores — Android Engineer (Full Remote)
**Oct 2018 – Feb 2021**

- Migrated the full codebase from Java to Kotlin.
- Implemented online sales via payment gateway, virtual magazine showcases, and SSO link from the Android app to a partner web ordering portal for cosmetic-factory restocking.
- Built scalable asynchronous order processing on AWS SQS / SNS for reliable message queuing and notification delivery.

**Stack:** Kotlin, AWS SQS, AWS SNS, AWS Storage SDK, Firebase (Analytics, Cloud Messaging, Crashlytics, Remote Config, Firestore, In-App Messaging, Auth), Facebook OAuth, DbFlow, Dagger 2, MVP, Picasso, Retrofit2, JUnit, Espresso.

---

### Concrete (an Accenture Company) — Jr. Android Engineer
**Dec 2016 – Oct 2018**

- Built the Minha CVC travel app from its initial implementation as part of the agency team; the app passed 1M+ downloads on Google Play.
- Implemented shop geolocation and store-locator guidance, increasing in-store visit volume.
- Implemented a travel-package itinerary feature, reducing customer-service phone-call volume.
- Implemented a travel-package virtual showcase, increasing customer flow to physical stores.
- Worked on the Getnet payments app; migrated MVP to MVVM; introduced RxJava2 and LiveData.

**Stack:** Java 8, Kotlin, RxJava2, LiveData, MVP → MVVM, Dagger 2, Google Maps API, Retrofit2, Picasso, Firebase (Analytics, FCM, Crashlytics, Remote Config), Jenkins CI/CD, JUnit, Espresso.

---

### PraPagar (fintech) — Jr. Android Engineer
**Jun 2015 – Dec 2016**

- Built the PraPagar mobile-payments app collaborating with a US-based team (MaxxPotential).
- Implemented online payments via QR code and geolocation.
- Backend REST work in PHP / Laravel 5.

**Stack:** Android SDK, PHP, Laravel 5, REST APIs, OOP, Design Patterns, Git, Agile.

---

### IBM Brasil — Software Engineering Intern
**Jun 2014 – Dec 2014 (7 mo) · Rio de Janeiro · while pursuing B.S. at Instituto Infnet**

- Wrote SQL queries against IBM DB2 in support of contract and sales teams; produced reporting spreadsheets and Hyperion-based BI artefacts.
- Documented internal processes via SharePoint; first professional exposure to enterprise databases, REST APIs, and Agile workflows.

**Stack:** IBM DB2, SQL, IBM Hyperion, SharePoint, Python, REST APIs, Git, OOP, Agile Methodologies.

---
### FASOLTI · Fábrica de Soluções em TI — Test Developer (Internship)
**Jan 2014 – May 2014 (5 mo)**

- Documented and implemented automated test cases in Selenium with TestNG.

**Stack:** Selenium, TestNG, REST APIs, Git, OOP, Agile.

---


## Published Applications

Shipped on the App Store and Google Play, plus a live web app and a live API.

### Archive — Home Video Player — Android TV · Apple TV (tvOS)
Google Play: https://play.google.com/store/apps/details?id=com.arquive.tv
App Store: https://apps.apple.com/us/app/archive-home-video-player/id6781049173

TV client for my self-hosted media library, built natively for each platform: HLS playback, server-side transcoding, library browsing and resume across devices.

**Stack:** Kotlin, Media3, Compose for TV, Room · Swift, SwiftUI, AVFoundation, HLS.

### IPTV Player — Apple TV (tvOS) · iPhone & iPad (iOS)
App Store (Apple TV, iPhone and iPad): https://apps.apple.com/us/app/iptv-player-own-sources/id6810480572

Player for the user's own Xtream accounts and M3U playlists: live TV with an EPG guide, movies and series with resume, HLS, MP4 and MPEG-TS playback, an on-device library that loads in small batches so large lists stay responsive, and private iCloud sync.

**Stack:** Swift, SwiftUI, AVKit, GRDB (SQLite), CloudKit, StoreKit 2.

### Beer Price Calculator — Android · iPhone & iPad (iOS)
Google Play: https://play.google.com/store/apps/details?id=br.com.raphaelbgr.preoscerveja
App Store: https://apps.apple.com/us/app/calculadora-de-cerveja/id6780996197

Compares beer prices by volume to find the best value per millilitre, built natively for each platform. Offline-first with local persistence and in-app billing on Android.

**Stack:** Kotlin, Jetpack Compose, Room, Play Billing · Swift, SwiftUI.

### ADAMA Studio — Web app for architects
https://vilanova.fastsoftware.uk/

Turns a floor plan into an engineering model in the browser: upload the plan, let the AI draft it in 3D, review it in conversation and in 2D, isometric and room views, then export to DXF, IFC and Revit. Each account connects its own AI provider.

**Stack:** Next.js, React, TypeScript, Three.js, Better Auth.

### RugShield — Pay-per-call API for AI agents (personal agentic project)
https://getrugshield.com/

A live API that AI agents call, and pay for per call, to check a Solana token or an unsigned transaction before signing, or to ask several independent risk advisors in parallel. Agents pay in USDC on Base or Solana through x402 (HTTP 402 payments, no account or API key), over plain HTTP or as MCP tools. A durable job store saves each paid result before the payment settles, so a lost response can be recovered without charging twice.

**Stack:** Python, FastAPI, x402, MCP, SQLite, Fly.io.

---

## AI-Native Engineering Practice

Infrastructure I built and run on my own machines, on my own time. Nothing below lives in a client
codebase or ships in a client build.

### Multi-provider LLM orchestration
A dispatch daemon routing coding work across my own seven-machine fleet, exposed to the
orchestrating agent as 15 MCP tools. Cost-aware routing over 8 providers and 22 models in 6 tiers,
applying rate-limit backoff, per-provider cooldowns and capability matching in order. Flat-rate
providers are marked serial-only, so a parallel fan-out cannot burn a subscription's concurrency
limit. Encrypted job transport keyed off the existing SSH identity — RSA-OAEP + AES-256-GCM,
fresh key and nonce per message — with five-source peer discovery under an explicit precedence
ladder.

### Instrumentation as a definition of done
I authored a language-neutral trace-contract standard: the compile-time reference graph is the
specification, and the runtime trace is reconciled against it automatically. It ships a written
spec, JSON Schemas, a cross-language conformance oracle, a golden-case corpus, and an agent plugin
whose hook blocks completion while the graph is stale. Gate severity is scoped — agent-authored
edits block at the definition of done; human commits degrade to a lint error, never a test failure.

### Closed-loop evaluation on my own TV app
My personal tvOS and Android TV media player exposes an on-device HTTP diagnostic surface — trace,
state, screenshot, scripted navigation, and 149 named test routines, each declaring required
parameters and returning a structured pass/fail or a machine-readable 422. An agent drives the app,
captures what the screen actually shows, reads the emitted events and evaluates against the
contract. Compiled out of release builds.

### Fleet operations
Manifest-driven deployment across five personal machines under launchd, systemd and Task Scheduler.
Each application declares its install, launch and health contract; deployment is a git push.
Supervision and auto-update run on decoupled intervals so a crash restarts in seconds. Cross-machine
control is RSA-signed per request.

**Stack:** Python, asyncio, MCP, HTTP/WebSocket, RSA-OAEP + AES-256-GCM, mDNS/Bonjour, Tailscale,
SQLite, systemd / launchd / Task Scheduler, Kotlin, Ktor, CUDA, Metal.

---

## Education

**Instituto Infnet — Rio de Janeiro · 2013 – 2018**
B.S. in Computer Engineering. Software development, mathematical modelling for software, operating-systems and computer-hardware architecture.



---

## Technical Skills

**Languages:** Kotlin, Java, Swift, C++, TypeScript, JavaScript, Python, Groovy, SQL, PHP (Laravel).

**Mobile / TV Platforms:** Android SDK, Android TV, Fire OS, webOS, Tizen, Android Leanback, Jetpack Compose, Compose for TV, Kotlin Multiplatform (KMP), NDK, JNI.

**Apple & Car Platforms:** iOS, tvOS, SwiftUI, UIKit, Apple CarPlay, Android Auto.

**Data:** SQL, SQLite, Room, PostgreSQL, Supabase (Postgres, auth, row-level security), IBM DB2.

**Streaming & Media:** OTT, CTV (Connected TV), Linear TV, VOD, Live Streaming, Media3 / ExoPlayer, HLS, DASH, H.264 / AVC, HEVC / H.265, Widevine DRM, PlayReady, Google IMA SDK, Server-Side Ad Insertion (SSAI), Client-Side Ad Insertion (CSAI), GStreamer, HDHomeRun, AirTV, Alticast, PDAQ.

**Architecture:** MVVM, MVI, Unidirectional Data Flow (UDF), Clean Architecture, Use Case, Multi-module, Plugin-based integration, RIBs, MVP.

**Jetpack & Reactive:** Coroutines, Flow, SharedFlow, StateFlow, LiveData, ViewModel, Navigation, Room, DataStore, Hilt, Dagger 2, RxJava2.

**Cloud & Backend:** Firebase (Analytics, Crashlytics, FCM, Auth, Firestore, Remote Config, In-App Messaging), AWS (SQS, SNS, Storage), REST APIs, Retrofit2, Moshi.

**Analytics:** New Relic, Mixpanel, Google Analytics 4, Firebase Analytics.

**Testing & Build:** JUnit, Mockk, Robolectric, Espresso, Selenium, TestNG, Buck, Gradle, CMake, Jenkins CI/CD, Flipper.

**AI & Agentic Systems:** LLM orchestration, multi-provider model routing and tier escalation, agent architectures (planner / executor / evaluator / monitor), MCP (Model Context Protocol) server and tool design, Retrieval-Augmented Generation (RAG), vector databases, knowledge graphs with community detection, prompt engineering, evaluation and scoring loops, local inference (Ollama, LM Studio, Qwen2.5-VL), faster-whisper / CTranslate2 speech-to-text, FAISS, InsightFace, Stable Diffusion / ComfyUI, Agno agents, GPU fleet scheduling and VRAM accounting (CUDA + Apple Metal).

**AI-Assisted Development:** Experienced with AI coding assistants and agentic build/release tooling, applied within each client's tooling policy.

**Performance & Observability:** Android Profiler, Firebase Crashlytics, New Relic, playback lifecycle and memory-leak debugging.

**Compliance & Security:** GDPR, CCPA, DRM, Content Security, OAuth, SSO, d-pad focus order.

**Spoken Languages:** Portuguese (native), English (fluent), Spanish (intermediate).
