Closed shokimble closed 1 year ago
Is someone ok to merge this?
@shokimble tried the changes as I need the feature but event is not firing
edit: found the issue
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
AppCompatActivity activity = (AppCompatActivity) source;
boolean isInPiPMode = activity.isInPictureInPictureMode();
// Check for changes on pip mode.
if (this.isInPiPMode != isInPiPMode) {
this.isInPiPMode = isInPiPMode;
Log.d(this.getName(), "Activity pip mode has changed to " + isInPiPMode);
// Dispatch onPictureInPicutreModeChangedEvent to js.
WritableMap args = Arguments.createMap();
args.putBoolean("isInPiPMode", isInPiPMode);
sendEvent("onPictureInPictureModeChanged", args);
}
}
here `activity.isInPictureInPictureMode()` is always returning `false`
Hey guys - thanks for this, but this library is unmaintained as I haven't the time 😬 but I do thank you for your commits. I'll go ahead and archive this repo, please do go ahead and fork the repo and commit the changes! Sorry for the inconvenience!
Hi,
I have added lifecycle events for when PIP mode is entered or exited as well as fixing a small issue with gradle affecting newer versions of React Native.
The README has also been updated.