Skip to content

Commit

Permalink
- adding android callback support
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav Chauhan authored and Pranav Chauhan committed Oct 14, 2018
1 parent 3081982 commit c053a7e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion Example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ export default class App extends Component<Props> {
"sticker10"
],
hiddenControls: [],
colors: undefined
colors: undefined,
onDone: () => {
console.log('on done')
},
onCancel: () => {
console.log('on cancel')
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion Example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ android {
}
}
}
buildToolsVersion '27.0.3'
buildToolsVersion '28.0.2'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion Example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions Example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Sep 09 19:41:28 IST 2018
#Sun Oct 14 12:20:52 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\:https://services.gradle.org/distributions/gradle-4.6-all.zip
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
buildToolsVersion '28.0.2'

defaultConfig {
minSdkVersion 16
Expand Down
4 changes: 2 additions & 2 deletions android/src/main/java/ui/photoeditor/RNPhotoEditorModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public void onActivityResult(Activity activity, int requestCode, int resultCode,
if (mDoneCallback != null) {

if (resultCode == Activity.RESULT_CANCELED) {
mCancelCallback.invoke(resultCode);
mCancelCallback.invoke();
} else {
mDoneCallback.invoke(intent.getExtras().getString("imagePath"));
mDoneCallback.invoke();
}

}
Expand Down

0 comments on commit c053a7e

Please sign in to comment.