diff --git a/README.MD b/README.MD index c3597bf..c73433d 100644 --- a/README.MD +++ b/README.MD @@ -1,5 +1,4 @@ -Installation -== +# Installation ``` cordova plugin add cordova-plugin-android-fragmentactivity --save ``` @@ -10,28 +9,24 @@ or phonegap plugin add cordova-plugin-android-fragmentactivity ``` -Usage -== +# Usage No manual configuration required. -How it works -== +# How it works 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. AndroidManifest.xml is automatically updated to use the new MainActivity. -Credits -== +# Credits Based on cordova-android-fragments (https://github.com/rajivnarayana/CordovaFragments) -History -== +# History +## 0.0.3 +- Added missing method to activity to handle permission request results -0.0.2 --- +## 0.0.2 - Correct log message - Add history to README -0.0.1 --- +## 0.0.1 Initial release diff --git a/package.json b/package.json index 7cab4cd..5c3c7bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-android-fragmentactivity", - "version": "0.0.2", + "version": "0.0.3", "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", diff --git a/plugin.xml b/plugin.xml index af632b7..b3393d7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + Cordova Android FragmentActivity Plugin 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. diff --git a/src/android/MainActivity.java b/src/android/MainActivity.java index 3eed194..8bf00b4 100644 --- a/src/android/MainActivity.java +++ b/src/android/MainActivity.java @@ -44,4 +44,10 @@ public void onCreate(Bundle savedInstanceState) ft.add(android.R.id.content, currentFragment); ft.commit(); } + + @Override + public void onRequestPermissionsResult(int requestCode, String permissions[], + int[] grantResults) { + currentFragment.onRequestPermissionsResult(requestCode,permissions,grantResults); + } }