Android Fragment onAttach(Activity activity) is deprecated in API 23
Reported by
braveyao@webrtc.org,
May 23 2016
|
|||
Issue descriptionSteps to reproduce the problem: Android Fragment onAttach(Activity activity) is deprecated in API 23. It's now onAttach(Context context). Delete this method when minSdkVersion of chrome is 23 in src/media/capture/content/java/src/org/chromium/media/ScreenCapture.java What is the expected behavior? What went wrong? Deprecated API. Did this work before? N/A Chrome version: 50.0.2661.102 Channel: n/a OS Version: Flash Version:
,
Feb 6 2017
,
Jun 26 2018
Copying a discussion from a related bug ( issue 537049 ): ScreenCapture can be reimplemented to be an activity, not a Fragment, because tokens from MediaProjectionManager are granted to the application, not to the specific activity that calls startActivityForResult(createScreenCaptureIntent(), ...). This way, ScreenCapture wouldn't need to mess with getLastTrackedFocusedActivity and fragment transactions to add itself into the current activity. It would also resolve the issue that ScreenCapture fragment never removes itself from the activity.
,
Jun 26 2018
,
Jun 26 2018
Thanks for the tips! We're going to implement a new W3C desktop capture API on all platforms soon. Will try to re-implement screen capture on Android accordingly and take care of this isssue. |
|||
►
Sign in to add a comment |
|||
Comment 1 by braveyao@chromium.org
, May 23 2016Owner: braveyao@chromium.org