0.0.7 • Published 3 years ago

react-native-assistant-context v0.0.7

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

react-native-assistant-context

Getting started

$ npm install react-native-assistant-context --save or $ yarn add react-native-assistant-context

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.ruykin.RNAssistantContextPackage; to the imports at the top of the file
  • Add new RNAssistantContextPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-assistant-context'
    project(':react-native-assistant-context').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-assistant-context/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-assistant-context')

Usage

import RNAssistantContext from 'react-native-assistant-context';

In MainActivity.java

import com.ruykin.RNAssistantContextModule;
@RequiresApi(api = Build.VERSION_CODES.M)
    @Override
    public void onProvideAssistContent(AssistContent assistContent) {
        super.onProvideAssistContent(assistContent);
        RNAssistantContextModule.setAssistantContext(assistContent);

    }

Tell assistant to share url:

RNAssistantContext.setWebUri(url);
0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

1.0.0

3 years ago