Git Product home page Git Product logo

react-native-feedback's Introduction

react-native-feedback

基于阿里云封装的App反馈平台,【一行代码,双平台反馈】

【 Android 平台配置 】

  1. 添加依赖文件

(1)将libs文件夹Copy到android / app 目录下 (2)打开android / app目录下的build.gradle文件,添加如下代码:

compile(name: 'alicloud-android-feedback-3.1.1', ext: 'aar')  
compile files('libs/alicloud-android-monitor-2.5.1.1_for_bc_proguard.jar')  
compile files('libs/utdid4all-1.1.5.3_proguard.jar')  
compile files('libs/alicloud-android-utils-1.1.1.jar') 

2.将feedback文件夹Copy到你的工程android目录的src下的包名目录下(注意:如果文件夹下的类文件报错,要将import的目录改成自己对应的包名即可)

【 iOS 平台配置 】

  1. 添加依赖

(1)添加系统公共库:

libz.tbd  
libresolv.tbd  
libsqlite3.tbd  
CoreMotion.framework  
CoreTelephony.framework  
SystemConfiguration.framework  

根据名字搜索,添加即可。

(2)在 info.plist 中添加如下字段

<key>NSCameraUsageDescription</key>  
<string>访问相机</string>  
<key>NSPhotoLibraryUsageDescription</key>  
<string>访问相册</string>  

(3)将ios_feedback文件夹添加到工程中

(4)打开 feedback/feedbackModule.m 文件,将key和secret修改成自己申请的即可

static NSString * const kAppKey = @"24697423"; // 改成自己申请的
static NSString * const kAppSecret = @"2ca83fb8533436a37adef002750c4dbd";// 改成自己申请的

【使用】

  1. 引入桥接
import {  
  NativeModules  
} from 'react-native'  
  1. 打开反馈界面
// openFeedbackActivity方法中可以传递json对象,用于向反馈平台传递额外参数信息。例如,传递设备信息:
let phone = {
  platform: 'android'
}
NativeModules.feedbackModule.openFeedbackActivity(phone) 

// 没有 则传null即可。
NativeModules.feedbackModule.openFeedbackActivity(null) 

react-native-feedback's People

Contributors

songxiaoliang avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.