{"id":30432755,"url":"https://github.com/porum/jb","last_synced_at":"2025-08-22T21:33:14.001Z","repository":{"id":310971145,"uuid":"1038449022","full_name":"porum/JB","owner":"porum","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-21T09:15:40.000Z","size":134,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-21T11:32:48.782Z","etag":null,"topics":["js-bridge","jsbridge","jsbridge-webview"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/porum.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":"2025-08-15T08:07:43.000Z","updated_at":"2025-08-21T11:17:22.000Z","dependencies_parsed_at":"2025-08-21T11:33:23.912Z","dependency_job_id":"3930b316-067d-41f2-ab86-75ddf654c3e5","html_url":"https://github.com/porum/JB","commit_stats":null,"previous_names":["porum/jb"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/porum/JB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porum%2FJB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porum%2FJB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porum%2FJB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porum%2FJB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/porum","download_url":"https://codeload.github.com/porum/JB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porum%2FJB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271703833,"owners_count":24806529,"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-08-22T02:00:08.480Z","response_time":65,"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":["js-bridge","jsbridge","jsbridge-webview"],"created_at":"2025-08-22T21:32:36.945Z","updated_at":"2025-08-22T21:33:13.965Z","avatar_url":"https://github.com/porum.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JB\nYet another js bridge for Android.\n\n## Usage\n\n1. Javascript side\n\n```javascript\nwindow.JB.sendMessage(\n  name = 'share',\n  payload = {\n      message: 'Hi, I share a JB to you.',\n  },\n  callback = function(resp) {\n    console.log(`share ${resp.data}(${resp.code})`);\n  }\n);\n```\n\n2. Android side\n\n```kotlin\n@Keep\ndata class SharePayload(\n  val message: String\n)\n\n@Name(value = \"share\")\nclass ShareBridge : JB\u003cSharePayload\u003e {\n  override fun call(context: Context, requestPayload: SharePayload, callback: Callback) {\n    // Invokes native android sharing\n    val sendIntent: Intent = Intent().apply {\n      action = Intent.ACTION_SEND\n      putExtra(Intent.EXTRA_TEXT, requestPayload.message)\n      type = \"text/plain\"\n    }\n    val shareIntent = Intent.createChooser(sendIntent, null)\n    context.startActivity(shareIntent, null)\n\n    // Callback to javascript\n    callback(\n      ResponsePayload(\n        code = 200,\n        data = \"Thank you share me a JB, I love it.\"\n      )\n    )\n  }\n}\n```\n\nThat's it, enjoy JB!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fporum%2Fjb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fporum%2Fjb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fporum%2Fjb/lists"}