{"id":19417253,"url":"https://github.com/gitliveapp/firebase-java-sdk","last_synced_at":"2025-10-15T14:18:44.364Z","repository":{"id":190956545,"uuid":"683642536","full_name":"GitLiveApp/firebase-java-sdk","owner":"GitLiveApp","description":"A pure java port of the Firebase Android SDK","archived":false,"fork":false,"pushed_at":"2025-05-20T10:34:03.000Z","size":486,"stargazers_count":24,"open_issues_count":14,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-20T11:44:21.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitLiveApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-27T08:28:12.000Z","updated_at":"2025-05-20T10:34:17.000Z","dependencies_parsed_at":"2023-08-27T11:20:17.651Z","dependency_job_id":"a7cfc26e-61c9-451b-8451-c964825656ea","html_url":"https://github.com/GitLiveApp/firebase-java-sdk","commit_stats":null,"previous_names":["gitliveapp/firebase-java-sdk"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/GitLiveApp/firebase-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitLiveApp","download_url":"https://codeload.github.com/GitLiveApp/firebase-java-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitLiveApp%2Ffirebase-java-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266963279,"owners_count":24013020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T13:08:21.226Z","updated_at":"2025-10-15T14:18:44.357Z","avatar_url":"https://github.com/GitLiveApp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"left\"\u003eFirebase Java SDK \u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/gitliveapp/firebase-java-sdk?style=flat-square\"\u003e \u003ca href=\"https://git.live\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?style=flat-square\u0026url=https%3A%2F%2Fapp.git.live%2Fbadge%3Forg%3DGitLiveApp%26repo%3Dfirebase-java-sdk\"\u003e\u003c/a\u003e\u003c/h1\u003e\n\u003cimg align=\"left\" width=\"75px\" src=\"https://avatars2.githubusercontent.com/u/42865805?s=200\u0026v=4\"\u003e \n  \u003cb\u003eBuilt and maintained with 🧡 by \u003ca href=\"https://git.live\"\u003eGitLive\u003c/a\u003e\u003c/b\u003e\u003cbr/\u003e\n  \u003ci\u003eDevelopment teams merge faster with GitLive\u003c/i\u003e\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\nThe Firebase Java SDK is a pure java port of the \u003ca href=\"https://github.com/firebase/firebase-android-sdk\"\u003eFirebase Android SDK\u003c/a\u003e \nto run in clientside java environments such as the desktop.\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nNote this is different to the official [Firebase Admin Java SDK](https://github.com/firebase/firebase-admin-java) which enables access \nto Firebase services from privileged environments (such as servers or cloud).\n\nIt is used by the \u003ca href=\"https://github.com/GitLiveApp/firebase-kotlin-sdk\"\u003eFirebase Kotlin SDK\u003c/a\u003e to support the JVM target for \nmultiplatform projects, enabling you to use Firebase directly from your common source targeting \u003cstrong\u003eDesktop\u003c/strong\u003e, \n\u003cstrong\u003eiOS\u003c/strong\u003e, \u003cstrong\u003eAndroid\u003c/strong\u003e and \u003cstrong\u003eWeb\u003c/strong\u003e, enabling the use of Firebase as a backend for \n\u003ca href=\"https://www.jetbrains.com/lp/compose-multiplatform/\"\u003eCompose Multiplatform\u003c/a\u003e, for example.\n\nIt's currently in an alpha state, to be used at your own discretion, and contributions are very welcome! \n\n## Using in your projects\n\nYou can add the library via Gradle:\n\n```kotlin\ndependencies {\n    implementation(\"dev.gitlive:firebase-java-sdk:0.6.2\")\n}\n```\n\nOr Maven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.gitlive\u003c/groupId\u003e\n    \u003cartifactId\u003efirebase-java-sdk\u003c/artifactId\u003e\n    \u003cversion\u003e0.6.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nYou can skip the above if you are using the SDK via the \u003ca href=\"https://github.com/GitLiveApp/firebase-kotlin-sdk\"\u003eFirebase Kotlin SDK\u003c/a\u003e \n\n### Initializing the SDK\n\nBefore you can use the SDK you need to call the `FirebasePlatform.initializeFirebasePlatform` function to provide an implementation for \nlogging, and persistent storage for simple key value pairs. This is used by the various Firebase products, for example, to persist the \nsigned-in user in Firebase Auth.\n\nHere's a simple example implementation in Kotlin that only persists in-memory:\n\n```kotlin\nFirebasePlatform.initializeFirebasePlatform(object : FirebasePlatform() {\n    val storage = mutableMapOf\u003cString, String\u003e()\n    override fun store(key: String, value: String) = storage.set(key, value)\n    override fun retrieve(key: String) = storage[key]\n    override fun clear(key: String) { storage.remove(key) }\n    override fun log(msg: String) = println(msg)\n})\n```\n\n#### Customizing Firestore offline data persistence database location\n\nThe `FirebasePlatform` interface also includes a `getDatabasePath` method for you to override if the following default implementation is not suitable:\n\n```kotlin\n    open fun getDatabasePath(name: String): File = File(\"${System.getProperty(\"java.io.tmpdir\")}${File.separatorChar}$name\")\n```\n\nThis is used by Firestore to support [offline data persistence](https://firebase.google.com/docs/firestore/manage-data/enable-offline).\n\n#### Initialize the Firebase application\n\nIt is also up to you to initialize the Firebase application object manually (unlike the Android SDK which is normally initialized via \nthe configuration file). \n\nYou first need to create a Firebase options object to hold the configuration data for the Firebase application. Full documentation for \nthe options can be found in the [Android API reference documentation](https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseOptions.Builder).\n\nThe use of `FirebaseOptions.Builder` is shown in the following example:\n\n```java\n// Manually configure Firebase Options. The following fields are REQUIRED:\n//   - Project ID\n//   - App ID\n//   - API Key\nFirebaseOptions options = new FirebaseOptions.Builder()\n        .setProjectId(\"my-firebase-project\")\n        .setApplicationId(\"1:27992087142:android:ce3b6448250083d1\")\n        .setApiKey(\"AIzaSyADUe90ULnQDuGShD9W23RDP0xmeDc6Mvw\")\n        // setDatabaseURL(...)\n        // setStorageBucket(...)\n        .build();\n```\n\nYou can then pass this to the `initialize` function, along with a mock Android `context` supplied by the `firebase-java-sdk`, like so:\n```kotlin\nimport android.app.Application\n\nval app = Firebase.initialize(Application(), options)\n```\n\n## Project status\n\nThe following libraries are available for the various Firebase products.\n\n| Service or Product\t                                                                               | Port of Android version |\n|---------------------------------------------------------------------------------------------------|:------------------------|\n| [Firebase Android BoM](https://maven.google.com/web/index.html?#com.google.firebase:firebase-bom) | `32.7.0`                |\n| [Authentication](https://firebase.google.com/docs/auth)                                           | N/A[^1]                 |\n| [Cloud Firestore](https://firebase.google.com/docs/firestore)                                     | `24.10.0`               |\n| [Realtime Database](https://firebase.google.com/docs/database)                                    | `20.3.0`                |\n| [Cloud Functions](https://firebase.google.com/docs/functions)                                     | `20.4.0`                |\n| ~[Remote Config](https://firebase.google.com/docs/remote-config)~                                 | `21.6.0`[^2]            |\n| ~[Installations](https://firebase.google.com/docs/projects/manage-installations)~                 | `17.2.0`[^2]            |\n\n[^1]: Google has not open-sourced the Firebase Auth implementation for Android so a basic implementation using the Rest API is provided.\n[^2]: Although the libraries are inlcuded they are currently not funtional \n\nIs the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-java-sdk/issues/new?labels=API+coverage\u0026template=increase-api-coverage.md\u0026title=Add+%5Bclass+name%5D.%5Bfunction+name%5D+to+%5Blibrary+name) to request additional API coverage or be awesome and [submit a PR](https://github.com/GitLiveApp/firebase-java-sdk/fork).\n\n### Limitations\n\nCurrently, the following limitations are observed:\n\n#### Firebase Auth implementation is minimal and only supports a small subset of the API:\n -  `createUserWithEmailAndPassword`\n  - `signInAnonymously`\n  - `signInWithCustomToken`\n  - `signInWithEmailAndPassword`\n  - `currentUser`\n  - `getAccessToken`\n  - `getUid`\n  - `addIdTokenListener`\n  - `removeIdTokenListener`\n  - `addAuthStateListener`\n  - `removeAuthStateListener`\n  - `signOut`\n#### Realtime Database does not support [Disk Persistence](https://firebase.google.com/docs/database/android/offline-capabilities), and should be setup as follows:\n```java\nFirebaseDatabase.getInstance().setPersistenceEnabled(false)\n```\n\n## Building and contributing\n\nThis library is built with Gradle. \n\nRun `./gradlew build` to build the library locally. \n\n### Implementation details\n\nApart from Firebase Auth, the Firebase Android libraries and their dependencies are used as-is from the published maven artifacts available\nat [Google's Maven Repository](https://maven.google.com). These are obviously designed to run on Android so to use them without modification we \ninclude a minimal Android emulation layer in the SDK only implementing the functionality used by the Firebase libraries at runtime.\n\nRobolectric is included as a compile-only dependency to overcome compilation errors due to missing Android APIs as they are many more \ncompile-time dependencies on the Android SDK than what is required for proper functioning at run-time. This makes development of the SDK \nsomewhat challenging as the compiler is unable to assist you on what Android functionality needs to be emulated before the library will \nfunction correctly (instead the library will error at runtime usually with one of the [ReflectiveOperationException](https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/lang/ReflectiveOperationException.html) subclasses.)\n\nThe best way to support more of the Firebase SDKs is via writing unit tests to test the required functionality at \nruntime and assert the correct behavior.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitliveapp%2Ffirebase-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitliveapp%2Ffirebase-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitliveapp%2Ffirebase-java-sdk/lists"}