forked from avastxa/fake_push
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md
119 lines (91 loc) · 3.43 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# fake_push
[![Build Status](https://cloud.drone.io/api/badges/v7lin/fake_push/status.svg)](https://cloud.drone.io/v7lin/fake_push)
[![Codecov](https://codecov.io/gh/v7lin/fake_push/branch/master/graph/badge.svg)](https://codecov.io/gh/v7lin/fake_push)
[![GitHub Tag](https://img.shields.io/github/tag/v7lin/fake_push.svg)](https://github.com/v7lin/fake_push/releases)
[![Pub Package](https://img.shields.io/pub/v/fake_push.svg)](https://pub.dartlang.org/packages/fake_push)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/v7lin/fake_push/blob/master/LICENSE)
flutter版腾讯(信鸽)推送SDK
## fake 系列 libraries
* [flutter版微信SDK](https://github.com/v7lin/fake_wechat)
* [flutter版腾讯(QQ)SDK](https://github.com/v7lin/fake_tencent)
* [flutter版新浪微博SDK](https://github.com/v7lin/fake_weibo)
* [flutter版支付宝SDK](https://github.com/v7lin/fake_alipay)
* [flutter版腾讯(信鸽)推送SDK](https://github.com/v7lin/fake_push)
* [flutter版talkingdata移动统计SDK](https://github.com/v7lin/fake_analytics)
## dart/flutter 私服
* [simple_pub_server](https://github.com/v7lin/simple_pub_server)
## docs
* [信鸽推送](https://xg.qq.com/)
* [华为推送](https://developer.huawei.com/consumer/cn/console#/openCard/AppService/6)
* [小米推送](https://dev.mi.com/console/appservice/push.html)
## verify
* [x] 华为通道(Android)
* [x] 小米通道(Android)
* [x] 信鸽通道(Android)
* [x] 信鸽通道(iOS)
## android
```
# 混淆已打入 Library,随 Library 引用,自动添加到 apk 打包混淆
```
```
...
android {
...
defaultConfig {
...
manifestPlaceholders = [
XG_ACCESS_ID : '${信鸽ACCESSID}',
XG_ACCESS_KEY : '${信鸽ACCESSKEY}',
XG_ACCESS_SCHEME: '${信鸽统一打开APP行为SCHEME}',// 非官方参数,可自定义(例如:fake_push),统一打开方式为 intent
HW_APPID : '${华为的APPID}',
XIAOMI_APPID : '${小米的APPID}',
XIAOMI_APPKEY : '${小米的APPKEY}',
PACKAGE_NAME : "${applicationId}",// 小米通道
]
...
}
...
}
```
通知打开应用 -> [使用Intent来跳转指定页面](https://xg.qq.com/docs/android_access/android_faq.html#%E6%B6%88%E6%81%AF%E7%82%B9%E5%87%BB%E4%BA%8B%E4%BB%B6%E4%BB%A5%E5%8F%8A%E8%B7%B3%E8%BD%AC%E9%A1%B5%E9%9D%A2%E6%96%B9%E6%B3%95)
```
例如:
fake_push://v7lin.github.io/notify_detail
fake_push://v7lin.github.io/notify_detail?param1=aa¶m2=bb
```
## ios
```
# Capabilities
Background Modes -> Remote notifications
Push Notifications
```
```
# info 添加字段 XG_ACCESS_ID、XG_ACCESS_KEY
<key>XG_ACCESS_ID</key>
<string>${信鸽ACCESSID}</string>
<key>XG_ACCESS_KEY</key>
<string>${信鸽ACCESSKEY}</string>
```
## flutter
* snapshot
```
dependencies:
fake_push:
git:
url: https://github.com/v7lin/fake_push.git
```
* release
```
dependencies:
fake_push: ^${latestTag}
```
## Demo
[Demo](./example/lib/main.dart)
## Getting Started
This project is a starting point for a Flutter
[plug-in package](https://flutter.io/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
For help getting started with Flutter, view our
[online documentation](https://flutter.io/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.