Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlutterActivityLaunchConfigs is not public ; #45747

Closed
wanjm opened this issue Nov 28, 2019 · 10 comments
Closed

FlutterActivityLaunchConfigs is not public ; #45747

wanjm opened this issue Nov 28, 2019 · 10 comments
Assignees
Labels
a: existing-apps Integration with existing apps via the add-to-app flow engine flutter/engine repository. See also e: labels. platform-android Android applications specifically

Comments

@wanjm
Copy link

wanjm commented Nov 28, 2019

FlutterActivityLaunchConfigs is not public ;

FlutterActivity.NewEngineIntentBuilder builder = FlutterActivity.withNewEngine();
builder.initialRoute("recorder");
builder.backgroundMode(FlutterActivityLaunchConfigs.BackgroundMode.transparent);

so I can't use it;

flutter doctor -v
[✓] Flutter (Channel dev, v1.12.15, on Mac OS X 10.15.1 19B88, locale zh-Hans-CN)
• Flutter version 1.12.15 at /opt/google/flutter
• Framework revision 459c7fb (33 hours ago), 2019-11-26 17:04:51 +0000
• Engine revision e136d63
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /opt/google/android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = /opt/google/android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.3

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Ultimate Edition (version 2018.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] Connected device (1 available)
• COL AL10 • VBJDU18725002458 • android-arm64 • Android 9 (API 28)

@iapicca
Copy link
Contributor

iapicca commented Nov 28, 2019

Hi @wanjm
are you submitting this issue as proposal ?
thank you

@iapicca iapicca added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 28, 2019
@wanjm
Copy link
Author

wanjm commented Nov 28, 2019

yes, I think it should be public , otherwise how i can use builder.backgroundMode(FlutterActivityLaunchConfigs.BackgroundMode.transparent);

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 28, 2019
@iapicca iapicca added a: existing-apps Integration with existing apps via the add-to-app flow c: proposal A detailed proposal for a change to Flutter c: new feature Nothing broken; request for a new capability labels Nov 28, 2019
@wozhizhizhi
Copy link

FlutterActivityLaunchConfigs is not public
how i can use?

@xster xster added the platform-android Android applications specifically label Dec 18, 2019
@xster
Copy link
Member

xster commented Dec 18, 2019

See the instructions at https://flutter.dev/docs/development/add-to-app/android/add-flutter-screen. Looks like the snippet is now

startActivity(
  FlutterActivity
    .withCachedEngine("my_engine_id")
    .backgroundMode(FlutterActivity.BackgroundMode.transparent)
    .build(context)
);

Please re-open the bug if that doesn't resolve the issue.

@xster xster closed this as completed Dec 18, 2019
@wozhizhizhi
Copy link

Weird FlutterActivity.BackgroundMode.transparent not found

@xster xster reopened this Dec 19, 2019
@xster xster added engine flutter/engine repository. See also e: labels. and removed c: proposal A detailed proposal for a change to Flutter c: new feature Nothing broken; request for a new capability labels Dec 19, 2019
@xster
Copy link
Member

xster commented Dec 19, 2019

Indeed, it's not public, and our https://flutter.dev/docs/development/add-to-app/android/add-flutter-screen guide is wrong. We should fix it.

@matthew-carroll
Copy link
Contributor

I opened a PR with a fix here:
flutter/engine#14673

@xster xster added this to To do in Add-to-app 2020Q1 via automation Jan 8, 2020
@xster xster moved this from To do to In progress in Add-to-app 2020Q1 Jan 8, 2020
@mayparadise
Copy link

How to register plugins and set transparent in FlutterFragment at V1.12.13 #47710

temporary wroks for me
thanks GEiki
Intent intent = FlutterActivity.withNewEngine().initialRoute('route').build(activity); intent.putExtra("background_mode","transparent"); activity.startActivity(intent);

@xster
Copy link
Member

xster commented Jan 9, 2020

Fixed in flutter/engine#14673

@xster xster closed this as completed Jan 9, 2020
@xster xster added this to Done in Platform Embeddings Refactor via automation Jan 9, 2020
Add-to-app 2020Q1 automation moved this from In progress to Done Jan 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 10, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jan 11, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: existing-apps Integration with existing apps via the add-to-app flow engine flutter/engine repository. See also e: labels. platform-android Android applications specifically
Projects
Development

No branches or pull requests

6 participants