-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (26 loc) · 673 Bytes
/
index.js
File metadata and controls
31 lines (26 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';
var invariant = require('invariant');
var React = require('react-native');
var {
NativeModules: {
RNAndroidShare
}
} = require('react-native');
var AndroidShare = {
openChooserWithOptions(options: Object, title: string) {
invariant(
typeof options === 'object',
'A valid option object is required'
);
invariant(
typeof title === 'string',
'Invalid Title: should be a string. Was: ' + title
);
console.log('calling android share chooser');
RNAndroidShare.openChooserWithOptions(options, title);
},
render() {
return (<View></View>);
}
};
module.exports = AndroidShare;