-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc64285
commit 85da365
Showing
194 changed files
with
7,088 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DS_Store | ||
.dart_tool/ | ||
.idea/ | ||
.metadata | ||
.packages | ||
pubspec.lock | ||
.pub/ | ||
mindbox.iml | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## 2.1.4 | ||
* Upgrade Android SDK dependency to v2.1.6. | ||
|
||
## 2.1.3 | ||
|
||
* Upgrade iOS Mindbox SDK dependency to v2.1.2. | ||
* Minor iOS changes on to the CodingKey value for the customAction variable in the OperationBodyRequest class. | ||
|
||
## 2.1.2 | ||
|
||
* Upgrade Android SDK dependency to v2.1.5. | ||
* Upgrade HMS upgraded to 6.5.0.300. | ||
* Fix bug on Android after reinitialization (changing your domain, endpoint and shouldCreateCustomer parameters in existing SDK integration). | ||
|
||
## 2.1.1 | ||
|
||
* Upgrade iOS SDK dependency to v.2.1.1. | ||
* Upgrade Android SDK dependency to v2.1.4. | ||
|
||
## 2.1.0 | ||
|
||
* Upgrade iOS SDK dependency to v.2.1.0. | ||
* Upgrade Android SDK dependency to v2.1.3. | ||
* Update init method: you can change sdk configuration without reinstallation of app. | ||
|
||
## 2.0.0 | ||
|
||
* Upgrade iOS SDK dependency to v2.0.1. | ||
* Upgrade Android SDK dependency to v2.1.2. | ||
* Add support of Huawei Push Kit. | ||
* Update onPushClickReceived method: add second argument with push payload. | ||
|
||
## 1.0.2 | ||
|
||
* Add iOS old format push notifications support. | ||
|
||
## 1.0.1 | ||
|
||
* Change native Mindbox iOS SDK version to 1.3.2. | ||
|
||
## 1.0.0 | ||
|
||
* Stable release of 'mindbox' plugin. Features: | ||
* receive and show push notification in both mobile platforms. | ||
* receive push notification data(links) in Flutter. | ||
* execute sync/async operations. | ||
|
||
## 0.2.0 | ||
|
||
* Add execute async operation. | ||
|
||
## 0.1.0 | ||
|
||
* Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Лицензионный договор (открытая лицензия) о предоставлении права использования программного обеспечения | ||
|
||
## 1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ | ||
|
||
1.1 В Соглашении термины и определения используются в следующих значениях: | ||
|
||
- Договор – абонентский договор оказания услуг/оферта на оказание услуг подписки на сервис Mindbox между Пользователем и Правообладателем; | ||
- Использование – объем прав Пользователя по Соглашению; | ||
- Использовать – осуществлять права Пользователя по Соглашению; | ||
- Пользователь – юридическое или физическое лицо, осуществляющее Использование программы; | ||
- Правообладатель – общество с ограниченной ответственностью «Майндбокс» (ОГРН 1097746380380); | ||
- Программа, Программа (исходный код), исходный код – программное обеспечение SDK Mindbox для передачи данных из мобильного приложения в CDP Mindbox, исключительные права на которые принадлежат Правообладателю; | ||
- Соглашение – этот лицензионный договор (открытая лицензия); | ||
- Стороны, Сторона – Правообладатель и/или Пользователь; | ||
- Некоммерческое использование – Использование Программы без цели извлечения прибыли. | ||
- Коммерческое использование – Использование Программы с целью извлечения прибыли. | ||
|
||
|
||
## 2. ПРЕДМЕТ СОГЛАШЕНИЯ | ||
|
||
2.1. По Соглашению Правообладатель предоставляет неограниченному количеству Пользователей простую (неисключительную) лицензию на Использование Программы в предусмотренных Соглашением пределах. | ||
|
||
|
||
2.2. Соглашение является договором присоединения и размещено в репозитории Программы Правообладателя на https://github.com/, чтобы условия были доступны неопределенному кругу лиц, и Пользователь мог ознакомиться с ними перед началом Использования Программы. Акцептом условий Соглашения будет считаться любое использование Программы Пользователем, в том числе не разрешенное по Соглашению, включая, но не ограничиваясь, копирование, воспроизведение, переработку исходного кода (Программы), установку и загрузку Программы. | ||
|
||
|
||
## 3. Права, передаваемые Пользователю | ||
|
||
3.1. Правообладатель размещает исходный код Программы по ссылкам: | ||
- репозиторий: https://github.com/mindbox-moscow/android-sdk; | ||
- менеджер пакетов: https://search.maven.org/search?q=mindbox. | ||
|
||
Исходный код в менеджере пакетов и в репозитории в ветке “Master” является “production ready”. | ||
|
||
Пользователь понимает, что исходный код в репозитории, не лежащий в ветке “Master”, не является “production ready”. | ||
|
||
Программа (исходный код) предоставляется Пользователю по принципу “as is” (“как есть”), то есть Правообладатель не обеспечивает работоспособность кода и не дает каких-либо гарантий в отношении безошибочной и бесперебойной работы Программы, соответствия Программы целям и ожиданиям Пользователя. | ||
|
||
|
||
3.2. Пользователь вправе использовать Программу (исходный код) для Некоммерческого использования без Договора с Правообладателем в следующем объеме: | ||
|
||
- чтение исходного кода человеком. | ||
|
||
|
||
3.3. Пользователь вправе использовать Программу (исходный код) для Коммерческого использования только при наличии Договора с Правообладателем и в следующем объеме: | ||
- чтение исходного кода человеком; | ||
- копирование, воспроизведение исходного кода “production ready” (Программы) внутри программного обеспечения (мобильное приложение) Пользователя для интеграции с программным обеспечением/внутри программного обеспечения Правообладателя — Mindbox. | ||
|
||
После прекращения Договора Пользователь вправе не удалять Программу (исходный код) или ее копию при условии обеспечения запрета вызова Программы (исходного кода), чтобы у была возможность легко возобновить Использование. Пользователь вправе возобновить Использование сохраненной Программы (исходного кода) при заключении нового Договора. | ||
|
||
3.4 Для получения дополнительных прав, не предусмотренных Соглашением, в том числе для отправления запросов, предложений Пользователь вправе связаться с Правообладателем по известным ему каналам связи, например, можно использовать “pull request”, “issue” на https://github.com/ или отправить имейл на [email protected]. | ||
|
||
Отправляя запрос на слияние (“merge”) предложенного кода с “production ready” через “pull request” на https://github.com/, Пользователь гарантирует и заверяет Правообладателя, что не нарушает прав третьих лиц, а также отчуждает права на предложенный им код в пользу Правообладателя в обмен на предоставление прав Использования по Соглашению без получения вознаграждения в денежной форме. | ||
|
||
3.5. Пользователь заверяет и гарантирует Правообладателю, что не будет использовать Программу (исходный код) за пределами прав и (или) на иных условиях, чем предусмотрено Соглашением, в том числе не будет использовать ее для Коммерческий целей без Договора с Правообладателем, не будет предоставлять, отчуждать третьим лицам права на использование Программы либо нового результата интеллектуальной деятельности, созданного на основе Программы. | ||
|
||
|
||
## 4. Ограничение ответственности Правообладателя | ||
|
||
4.1. Поскольку права на Использование Программы (исходного кода) предоставляются Пользователю бесплатно и по принципу “as is” (“как есть”), Правообладатель не несет ответственность за убытки, причиненные Пользователю и третьим лицам в результате Использования или невозможности Использования Программы, в том числе если Программа не работает безошибочно, бесперебойно, не соответствует целям и ожиданиям Пользователя. | ||
|
||
|
||
4.2. Правообладатель не возмещает Пользователю косвенные, непрямые убытки, упущенную выгоду. Общая максимальная ответственность Правообладателя по Соглашению ограничивается 1 (одним) рублем РФ. | ||
|
||
## 5. Применимое право и разрешение споров | ||
|
||
5.1. К Соглашению применяется материальное право Российской Федерации. Все споры из Соглашения и в связи с ним подлежат передаче в суд по месту нахождения Правообладателя. | ||
|
||
## 6. Заключительные положения | ||
|
||
6.1. Соглашение может быть изменено Правообладателем в любое время без каких-либо ограничений и без специального уведомления Пользователя. Новая редакция Соглашения вступает в силу с даты ее размещения в репозитории Программы Правообладателя на https://github.com/ либо с даты ее доведения до сведения Пользователя Правообладателем в иной удобной форме. | ||
|
||
6.2 Для случаев Некоммерческого использования Программы Соглашение действует бессрочно. | ||
|
||
6.3 Для случаев Коммерческого использования Программы Соглашение действует до окончания срока действия Договора. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
[![Pub Version](https://img.shields.io/pub/v/mindbox?color=blue)](https://pub.dev/packages/mindbox) | ||
|
||
This plugin is a wrapper over the native Mindbox([iOS](https://github.com/mindbox-moscow/ios-sdk), | ||
[Android](https://github.com/mindbox-moscow/android-sdk)) libraries that allows to | ||
receive and handle push notifications. | ||
|
||
## Features | ||
|
||
* Receive and show push notification in both mobile platforms. | ||
* Receive push notification data(link, payload) in Flutter. | ||
* Execute sync/async operations. | ||
|
||
## Getting started | ||
|
||
This plugin depends on the configuration of push notifications on native platforms. It's necessary | ||
to follow the steps specified in the guide: | ||
|
||
* [Mindbox Flutter SDK](https://developers.mindbox.ru/docs/flutter-sdk) | ||
|
||
## Usage | ||
|
||
### Initialization | ||
|
||
```dart | ||
import 'package:mindbox/mindbox.dart'; | ||
void main() { | ||
WidgetsFlutterBinding.ensureInitialized(); | ||
final config = Configuration( | ||
domain: "your domain", | ||
endpointIos: "iOs endpoint", | ||
endpointAndroid: "Android endpoint", | ||
subscribeCustomerIfCreated: true, | ||
); | ||
Mindbox.instance.init(configuration: config); | ||
runApp(MyApp()); | ||
} | ||
``` | ||
|
||
### Handling push click | ||
|
||
```dart | ||
Mindbox.instance.onPushClickReceived((link, payload) { | ||
print(payload); | ||
switch (link) { | ||
case 'mindbox.cloud': | ||
Navigator.push(context, MaterialPageRoute(builder: (context) => ContentPage())); | ||
break; | ||
case 'mindbox.cloud/user': | ||
Navigator.push(context, MaterialPageRoute(builder: (context) => ProfilePage())); | ||
break; | ||
default: | ||
Navigator.push(context, MaterialPageRoute(builder: (context) => HomePage())); | ||
} | ||
}); | ||
``` | ||
|
||
### Getting device UUID | ||
|
||
```dart | ||
Mindbox.instance.getDeviceUUID((uuid) => print(uuid)); | ||
``` | ||
|
||
### Getting APNS/FMS/HMS token | ||
|
||
```dart | ||
Mindbox.instance.getToken((token) => print(token)); | ||
``` | ||
|
||
### Execute async operation | ||
|
||
```dart | ||
Mindbox.instance.executeAsyncOperation( | ||
operationSystemName: 'operationName', | ||
operationBody: {'example': 'body'}, | ||
); | ||
``` | ||
|
||
### Execute sync operation | ||
|
||
```dart | ||
Mindbox.instance.executeSyncOperation( | ||
operationSystemName: 'operationName', | ||
operationBody: {'example': 'body'}, | ||
onSuccess: (String response) { | ||
jsonDecode(response); | ||
}, | ||
onError: (MindboxError error){ | ||
if (error is MindboxProtocolError) { | ||
print(error.code); | ||
} | ||
print(error.message); | ||
jsonDecode(error.data); | ||
}, | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
rules: | ||
- file_names | ||
- lines_longer_than_80_chars | ||
- prefer_single_quotes | ||
- avoid_print | ||
- cancel_subscriptions | ||
- constant_identifier_names | ||
- directives_ordering | ||
- empty_constructor_bodies | ||
- flutter_style_todos | ||
- implementation_imports | ||
- package_names | ||
- package_prefixed_library_names | ||
- prefer_final_locals | ||
- sort_child_properties_last | ||
- sort_constructors_first | ||
- sort_unnamed_constructors_first | ||
- type_annotate_public_apis | ||
- unnecessary_await_in_return | ||
- public_member_api_docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
mindbox_example.iml | ||
pubspec.lock | ||
.metadata | ||
.packages | ||
.flutter-plugins-dependencies | ||
.flutter-plugins | ||
ios/Podfile.lock | ||
ios/Pods/ | ||
android/gradlew | ||
android/gradlew.bat | ||
android/local.properties | ||
android/mindbox_example_android.iml | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
**/ios/Flutter/.last_build_id | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
|
||
# Web related | ||
lib/generated_plugin_registrant.dart | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Obfuscation related | ||
app.*.map.json | ||
|
||
# Android Studio will place build artifacts here | ||
/android/app/debug | ||
/android/app/profile | ||
/android/app/release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# mindbox_example | ||
|
||
Demonstrates how to use the mindbox plugin. | ||
|
||
## Getting Started | ||
|
||
This project is a starting point for a Flutter application. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file configures the analyzer, which statically analyzes Dart code to | ||
# check for errors, warnings, and lints. | ||
# | ||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled | ||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be | ||
# invoked from the command line by running `flutter analyze`. | ||
|
||
# The following line activates a set of recommended lints for Flutter apps, | ||
# packages, and plugins designed to encourage good coding practices. | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
# The lint rules applied to this project can be customized in the | ||
# section below to disable rules from the `package:flutter_lints/flutter.yaml` | ||
# included above or to enable additional rules. A list of all available lints | ||
# and their documentation is published at | ||
# https://dart-lang.github.io/linter/lints/index.html. | ||
# | ||
# Instead of disabling a lint rule for the entire project in the | ||
# section below, it can also be suppressed for a single line of code | ||
# or a specific dart file by using the `// ignore: name_of_lint` and | ||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file | ||
# producing the lint. | ||
rules: | ||
# avoid_print: false # Uncomment to disable the `avoid_print` rule | ||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
gradle-wrapper.jar | ||
/.gradle | ||
/captures/ | ||
/gradlew | ||
/gradlew.bat | ||
/local.properties | ||
GeneratedPluginRegistrant.java | ||
|
||
# Remember to never publicly share your keystore. | ||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app | ||
key.properties | ||
**/*.keystore | ||
**/*.jks | ||
/app/google-services.json |
Oops, something went wrong.