Skip to content

An android cordova 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.

License

Notifications You must be signed in to change notification settings

ReallySmallSoftware/cordova-plugin-android-fragmentactivity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

cordova plugin add cordova-plugin-android-fragmentactivity --save

or

phonegap plugin add cordova-plugin-android-fragmentactivity

Usage

No manual configuration required.

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

Based on cordova-android-fragments (https://github.com/rajivnarayana/CordovaFragments)

History

2.2.1

  • Fix bug where fragment launched twice

2.2.0

  • Add support for onNewIntent
  • Apply some fixes from main cordova repo

2.1.0

  • Add fix to ensure only root task runs

2.0.0

1.0.0

  • Migrate to androidx

0.0.9

  • Fix missing import

0.0.8

  • Add onActivityResult callback

0.0.7

  • Merge FrameLayout change
  • Merge ${mypackage} fix

0.0.6

  • Fix stupid cordova-android 7 detection

0.0.5

  • Attempt to avoid crash only seen on Galaxy J1 Ace (5.1.1)

0.0.4

  • Experimental support for cordova-android 7
  • Increased dependency versions

0.0.3

  • Added missing method to activity to handle permission request results

0.0.2

  • Correct log message
  • Add history to README

0.0.1

Initial release

About

An android cordova 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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 87.3%
  • JavaScript 12.7%