Skip to content

Commit ecb936c

Browse files
Add method to handle onRequestPermissionsResult
1 parent 7691e3a commit ecb936c

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

README.MD

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Installation
2-
==
1+
# Installation
32
```
43
cordova plugin add cordova-plugin-android-fragmentactivity --save
54
```
@@ -10,28 +9,24 @@ or
109
phonegap plugin add cordova-plugin-android-fragmentactivity
1110
```
1211

13-
Usage
14-
==
12+
# Usage
1513
No manual configuration required.
1614

17-
How it works
18-
==
15+
# How it works
1916
This plugin comes bundled with a CordovaFragment (which is a Fragment similar to CordovaActivity) and a MainActivity that extends AppCompatActivity and adds CordovaFragment using FragmentTransactions.
2017

2118
AndroidManifest.xml is automatically updated to use the new MainActivity.
2219

23-
Credits
24-
==
20+
# Credits
2521
Based on cordova-android-fragments (https://github.com/rajivnarayana/CordovaFragments)
2622

27-
History
28-
==
23+
# History
24+
## 0.0.3
25+
- Added missing method to activity to handle permission request results
2926

30-
0.0.2
31-
--
27+
## 0.0.2
3228
- Correct log message
3329
- Add history to README
3430

35-
0.0.1
36-
--
31+
## 0.0.1
3732
Initial release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-android-fragmentactivity",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"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.",
55
"cordova": {
66
"id": "cordova-plugin-android-fragmentactivity",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-android-fragmentactivity" version="0.0.2">
2+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-android-fragmentactivity" version="0.0.3">
33

44
<name>Cordova Android FragmentActivity Plugin</name>
55
<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>

src/android/MainActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,10 @@ public void onCreate(Bundle savedInstanceState)
4444
ft.add(android.R.id.content, currentFragment);
4545
ft.commit();
4646
}
47+
48+
@Override
49+
public void onRequestPermissionsResult(int requestCode, String permissions[],
50+
int[] grantResults) {
51+
currentFragment.onRequestPermissionsResult(requestCode,permissions,grantResults);
52+
}
4753
}

0 commit comments

Comments
 (0)