Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arlenwang/react-native-cq-share

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arlenwang/react-native-cq-share

Share pictures or graphic links using system sharing.

  • 1.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

感谢 cukiy 开源分享,原库 https://www.npmjs.com/package/react-native-cq-share 貌似不再维护更新,也没有提供 Github 仓库,但我个人在使用过程中需要修改部分内容,所以算是 fork 一个版本到这里维护。

Npm Install

$ npm i @arlenwang/react-native-cq-share

0.6.x自动连

<0.6命令

$ react-native link react-native-cq-share
Use
import React, { Component } from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    View,
    TouchableOpacity
} from 'react-native';

import { share } from 'react-native-cq-share'

export default class App extends Component<Props> {
render() {
    return (
        <View style={styles.container}>
            <TouchableOpacity style={{height:60,width:100,backgroundColor:'red'}}
                              onPress={()=>share(options,callbake)}>
            </TouchableOpacity>
        </View>
        );
    }
}
Parameters

iOS

share方法有以下参数:
options: 分享的数据. 包含四个字段.
        title(String. 标题)
        url(String. 链接)
        remoteImages(Array. 远程图片url数组)
        localImages(Array. 本地图片路径数组)
callbake:  分享完成的回调. 返回true(分享成功)或false(分享失败)

Android

share方法有以下参数:
options: 分享的数据. 包含四个字段.
        title(String.纯文本分享)
        remoteImages(Array. 远程图片url数组)
        localImages(Array. 本地图片路径数组)
        description(String.图片分享默认描述文本)    

Keywords

FAQs

Package last updated on 03 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc