shareinstall_flutter 1.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

shareinstall_flutter #

A new Flutter plugin for shareinstall.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

ShareInstall 官网 http://www.shareinstall.com.cn

APP集成 #

官网注册申请appkey

anroid #

1.appid配置 #

修改文件AndroidManifest.xml

	 <!--配置appkey-->
        <meta-data
            android:name="com.shareinstall.APP_KEY"
            android:value="2EBK2KR2B6BAK7" />//ShareInstall 申请的appkey

2.secheme配置 #

      <!--配置scheme-->
         <intent-filter>
             <action android:name="android.intent.action.VIEW" />
             <category android:name="android.intent.category.DEFAULT" />
             <category android:name="android.intent.category.BROWSABLE" />
             <data android:scheme="eafb1912" />//ShareInstall 后台应用配置生成的eafb1912
         </intent-filter>

3.gradle 添加依赖 #

    implementation 'com.android.support:appcompat-v7:26.1.0'

iOS #

1.appid配置 #

在 Info.plist 文件中配置 appKey 键值对,如下:

     <key>com.shareinstall.APP_KEY</key>
<string>从shareinstall官网后台获取自己应用的appkey</string>

2.universal links配置(iOS9以上版本适用) #

      开启Associated Domains功能,选中项目文件,选择tagets的对应的taget,再点Capabilities,打开Associated Domains为on,点击+号添加后台提供的管理域名,ps:需要先上传一次包可生成。

3.secheme配置 #

在 Info.plist 文件中配置

      <key>CFBundleURLTypes</key>
    <array>
        <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>shareinstall</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>"从shareinstall后台获取的scheme"</string>
        </array>
        </dict>
    </array>

4.注意 #

      a:other linker flags加-ObjC
      b:引用libz.1.2.8.tbd、libc++.1.tbd

dart示例 #

import 'package:shareinstall_flutter/shareinstall_flutter.dart'; #

   ShareinstallFlutter.addEventHandler((data) {
    //app后台唤醒 获取唤醒参数 data json字符串
      print("data wakeup newIntent>>>" + data);
    });
    ShareinstallFlutter.getInstall().then((data) {
    //获取安装参数 data json字符串
      print("data install>>>" + data);
    });
    ShareinstallFlutter.getWakeUp().then((data) {
    //获取唤醒参数 data json字符串
      print("data wakeup>>>" + data);
    });

    //调用注册接口  用于统计注册
    ShareinstallFlutter.reportRegister();
    //清除监听
    ShareinstallFlutter.clearAppGetInfoListener();

测试 #

集成后需打release包上传到官网后台即可使用在线测试地址,进行测试

注意 #

终端先运行 #

export PUB_HOSTED_URL=https://pub.flutter-io.cn //国内用户需要设置
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //国内用户需要设置

再设置yaml #

dev_dependencies:
  flutter_test:
    sdk: flutter

  shareinstall_flutter: ^1.0.2

1.0.5 #

TODO: 修改了一些bug.

1.0.4 #

TODO: 完善了文档2.

1.0.3 #

TODO: 完善了文档.

1.0.2 #

TODO: 修改了iOS和Android的bug.

1.0.1 #

TODO: 第一个发布版本.

0.0.1 #

TODO: Describe initial release.

example/README.md

shareinstall_flutter_example #

Demonstrates how to use the shareinstall_flutter 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:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  shareinstall_flutter: ^1.0.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:shareinstall_flutter/shareinstall_flutter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
2
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
75
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Oct 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

9 out of 9 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test