diff --git a/android/app/build.gradle b/android/app/build.gradle
index 6475db4..16ed21e 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -137,6 +137,7 @@ android {
}
dependencies {
+ compile project(':react-native-share')
compile project(':realm')
compile project(':react-native-svg')
compile fileTree(dir: "libs", include: ["*.jar"])
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index c4aa484..4654ff4 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -21,6 +21,16 @@
+
+
+
+
diff --git a/android/app/src/main/java/com/drip/MainApplication.java b/android/app/src/main/java/com/drip/MainApplication.java
index b0f2bc2..532b206 100644
--- a/android/app/src/main/java/com/drip/MainApplication.java
+++ b/android/app/src/main/java/com/drip/MainApplication.java
@@ -3,6 +3,8 @@ package com.drip;
import android.app.Application;
import com.facebook.react.ReactApplication;
+import cl.json.RNSharePackage;
+import cl.json.ShareApplication;
import io.realm.react.RealmReactPackage;
import com.horcrux.svg.SvgPackage;
import com.facebook.react.ReactNativeHost;
@@ -13,7 +15,7 @@ import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
-public class MainApplication extends Application implements ReactApplication {
+public class MainApplication extends Application implements ReactApplication, ShareApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
@@ -25,6 +27,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
+ new RNSharePackage(),
new RealmReactPackage(),
new SvgPackage()
);
@@ -46,4 +49,9 @@ public class MainApplication extends Application implements ReactApplication {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
+
+ @Override
+ public String getFileProviderAuthority() {
+ return "com.drip.provider";
+ }
}
diff --git a/android/app/src/main/res/xml/filepaths.xml b/android/app/src/main/res/xml/filepaths.xml
new file mode 100644
index 0000000..ce1ddcf
--- /dev/null
+++ b/android/app/src/main/res/xml/filepaths.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/android/settings.gradle b/android/settings.gradle
index c2cab2c..0c603cd 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,4 +1,6 @@
rootProject.name = 'drip'
+include ':react-native-share'
+project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':react-native-svg'
diff --git a/app.js b/app.js
index 7977ed4..bb31b22 100644
--- a/app.js
+++ b/app.js
@@ -4,8 +4,10 @@ import Home from './components/home'
import Calendar from './components/calendar'
import CycleDay from './components/cycle-day'
import Chart from './components/chart/chart'
+import Settings from './components/settings'
-// this is until react native fixes this bug, see https://github.com/facebook/react-native/issues/18868#issuecomment-382671739
+// this is until react native fixes this bugg, see
+// https://github.com/facebook/react-native/issues/18868#issuecomment-382671739
import { YellowBox } from 'react-native'
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated'])
@@ -13,5 +15,6 @@ export default createStackNavigator({
home: { screen: Home },
calendar: { screen: Calendar },
cycleDay: { screen: CycleDay },
- chart: { screen: Chart }
+ chart: { screen: Chart },
+ settings: { screen: Settings }
})
diff --git a/components/home.js b/components/home.js
index 48af5f5..3e13a16 100644
--- a/components/home.js
+++ b/components/home.js
@@ -68,6 +68,12 @@ export default class Home extends Component {
title="Go to chart">
+
+
+