Skip to content

Commit

Permalink
Add onActivityResult support
Browse files Browse the repository at this point in the history
  • Loading branch information
ReallySmallSoftware committed Nov 1, 2018
1 parent bc1aab3 commit 1e76d2c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ AndroidManifest.xml is automatically updated to use the new MainActivity.
Based on cordova-android-fragments (https://github.com/rajivnarayana/CordovaFragments)

# History
## 0.0.8
- Add onActivityResult callback

## 0.0.7
- Merge FrameLayout change
- Merge ${mypackage} fix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-android-fragmentactivity",
"version": "0.0.7",
"version": "0.0.8",
"description": "An android plugin that provides a replacement activity to the default activity to start a cordova application with MainActivity as a Fragment Activity. Useful when you want to add native views on top of cordova webview.",
"cordova": {
"id": "cordova-plugin-android-fragmentactivity",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-android-fragmentactivity" version="0.0.7">
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-android-fragmentactivity" version="0.0.8">

<name>Cordova Android FragmentActivity Plugin</name>
<description>An android plugin that provides a replacement activity to the default activity to start a cordova application with MainActivity as a Fragment Activity. Useful when you want to add native views on top of cordova webview.</description>
Expand Down
6 changes: 6 additions & 0 deletions src/android/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public void onDestroy() {
currentFragment.onDestroy();
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode,resultCode,data);
currentFragment.onActivityResult(requestCode,resultCode,data);
}

@Override
public void onRequestPermissionsResult(int requestCode, String permissions[],
int[] grantResults) {
Expand Down

0 comments on commit 1e76d2c

Please sign in to comment.