{"id":20732424,"url":"https://github.com/jpush/jmlink-flutter-plugin","last_synced_at":"2025-04-23T22:09:01.330Z","repository":{"id":35916502,"uuid":"219950273","full_name":"jpush/jmlink-flutter-plugin","owner":"jpush","description":"JPush's officially supported Flutter plugin (Android \u0026 iOS). 极光推送官方支持的 Flutter 插件（Android \u0026 iOS）。","archived":false,"fork":false,"pushed_at":"2023-07-28T04:15:51.000Z","size":132,"stargazers_count":20,"open_issues_count":8,"forks_count":10,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-23T22:08:05.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpush.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-06T08:42:19.000Z","updated_at":"2024-12-23T07:30:16.000Z","dependencies_parsed_at":"2022-08-08T12:16:42.288Z","dependency_job_id":null,"html_url":"https://github.com/jpush/jmlink-flutter-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmlink-flutter-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmlink-flutter-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmlink-flutter-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmlink-flutter-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpush","download_url":"https://codeload.github.com/jpush/jmlink-flutter-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250522299,"owners_count":21444511,"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","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-17T05:19:22.149Z","updated_at":"2025-04-23T22:09:01.254Z","avatar_url":"https://github.com/jpush.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Jmlink Flutter Plugin\n\n### 安装\n\n在工程 pubspec.yaml 中加入 dependencies\n\n```yaml\n//pub 集成\ndependencies:\n  jmlink_flutter_plugin: 2.1.4\n\n  \n//github 集成  \ndependencies:\n  jmlink_flutter_plugin:\n    git:\n      url: git://github.com/jpush/jmlink-flutter-plugin.git\n      ref: master\n```\n### 配置\n\n##### Android:\n\n+ 在 `/android/app/build.gradle` 中添加下列代码：\n\n```groovy\nandroid: {\n  ....\n  defaultConfig {\n    applicationId \"替换成自己应用 ID\"\n    ...\n    ndk {\n\t//选择要添加的对应 cpu 类型的 .so 库。\n\tabiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a',        \n    }\n\n    manifestPlaceholders = [\n        JPUSH_PKGNAME : applicationId,\n        JPUSH_APPKEY : \"appkey\", // NOTE: JPush 上注册的包名对应的 Appkey.\n        JPUSH_CHANNEL : \"developer-default\", //暂时填写默认值即可.\n        JMLINK_SCHEME: \"you scheme\",//  设置跳转的scheme\n    ]\n  }    \n}\n```\n\n+ 在 `/android/app/src/main/AndroidManifest.xml` 中配置 scheme\n\n```\n\u003c!-- 将“你的Scheme”替换为后台填写的URI Scheme。--\u003e\n\n\u003cactivity android:name=\".WelcomeActivity\"\u003e\n         \u003cintent-filter\u003e\n            \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n            \u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n            \u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n            \u003cdata android:scheme='${JMLINK_SCHEME}' /\u003e\n         \u003c/intent-filter\u003e\n\u003c/activity\u003e\n```\n\n***注意：***配置完`scheme`之后，必须在 `WelcomeActivity` 的 `onCreate` 方法中执行 `JmlinkFlutterPlugin.setData`方法：\n\n```\npublic class WelcomeActivity extends Activity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        Log.d(\"| WelcomeActivity | - \",\"onCreate:\");\n        super.onCreate(savedInstanceState);\n\n        JmlinkFlutterPlugin.setData(getIntent().getData());\n\n        Intent intent = new Intent(this,MainActivity.class);\n        startActivity(intent);\n        finish();\n    }\n    //@Override\n\n\n    protected void onDestroy() {\n        Log.d(\"| WelcomeActivity | - \",\"onDestroy:\");\n        super.onDestroy();\n    }\n    protected void onNewIntent(Intent intent) {\n        Log.d(\"| WelcomeActivity | - \",\"onNewIntent:\");\n        super.onNewIntent(intent);\n        setIntent(intent);\n    }\n}\n```\n\n#### iOS\n\n[详细请看](https://docs.jiguang.cn/jmlink/client/iOS/ios_guide/)\n\n- 1.配置App的URL Scheme\n\niOS系统中App之间是相互隔离的，通过URL Scheme，App之间可以相互调用，并且可以传递参数。\n\n选中Target-\u003eInfo-\u003eURL Types，配置URL Scheme（比如：jmlink）\n\n在Safari中输入URL Scheme://（比如：jmlink://）如果可以唤起App，说明该URL Scheme配置成功\n\n- 2.配置Universal link\n\nUniversal link是iOS9的一个新特性，通过Universal link，App可以无需打开Safari，直接从微信等应用中跳转到App，真正的实现一键直达\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjmlink-flutter-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpush%2Fjmlink-flutter-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjmlink-flutter-plugin/lists"}