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

Cast button doesn't do anything #3

Open
Gnitry opened this issue Jun 12, 2023 · 3 comments
Open

Cast button doesn't do anything #3

Gnitry opened this issue Jun 12, 2023 · 3 comments

Comments

@Gnitry
Copy link

Gnitry commented Jun 12, 2023

Summary
When Cast Button is pressed nothing happens. Every button press logs only prints the following:

I/ViewRootImpl@271b807[MainActivity](17358): ViewPostIme pointer 0
I/ViewRootImpl@271b807[MainActivity](17358): ViewPostIme pointer 1
I/SessionManager(17358): End session for com.felnanuke.google_cast_example

Expected
When Cast Button is pressed, the dialog with available cast devices should appear

Steps to reproduce

  • Clone repository
  • Go to example directory
  • flutter run
  • Click on Cast Button inside the running application (Android)

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.4, on Microsoft Windows [Version 10.0.22621.1778], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc4)
[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.6.2)
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.79.0)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!
@alr2413
Copy link

alr2413 commented Jun 18, 2023

yea, that's the current code in example folder.
@Gnitry to make it work, you need to call GoogleCastDiscoveryManager.instance.startDiscovery(); first somewhere in your code and then from the list of found cast devices, pick one and then click on the floating action to play a media (set the autoplay attribute to true for that media).

@slimgharbi-cyber
Copy link

slimgharbi-cyber commented Jun 27, 2023

Hello @alr2413 / @Gnitry would you please give me hints/instructions how to make this package run correctly

@majusss
Copy link

majusss commented Jul 6, 2024

Hello, i have same issue

flutter_google_cast-master\example>flutter run
Launching lib\main.dart on Realme 8 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

Running Gradle task 'assembleDebug'...                              6,1s
√  Built build\app\outputs\flutter-apk\app-debug.apk.
I/CastDynamiteModuleImpl( 4427): xi created by ClassLoader dalvik.system.DelegateLastClassLoader[DexPathList[[zip file "/data/app/~~d_GlrDtYPaKOglYcsUEh4w==/com.google.android.gms-WGwN7Go1VVtTuWEB5FGZsQ==/split_DynamiteModulesC.apk"],nativeLibraryDirectories=[/data/app/~~d_GlrDtYPaKOglYcsUEh4w==/com.google.android.gms-WGwN7Go1VVtTuWEB5FGZsQ==/split_DynamiteModulesC.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]].
W/le_cast_example( 4427): Accessing hidden method Ldalvik/system/VMStack;->getStackClass2()Ljava/lang/Class; (unsupported, reflection, allowed)
V/MediaRouter( 4427): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
W/MobStoreFlagStore( 4427): Unable to update local snapshot for com.google.android.gms.cast_dynamite#com.felnanuke.google_cast_example, may result in stale flags.
W/MobStoreFlagStore( 4427): java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.felnanuke.google_cast_example, sha256=[2203a1459aa85c4445e23a53c388ba597b842d436710d1fab1d3a2b694e60d89], atk=false, ver=242335039.true (go/gsrlt)
W/MobStoreFlagStore( 4427):     at m.cbd.s(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):21)
W/MobStoreFlagStore( 4427):     at m.cbd.get(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):3)
W/MobStoreFlagStore( 4427):     at m.cco.g(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):8)
W/MobStoreFlagStore( 4427):     at m.bkr.d(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):1)
W/MobStoreFlagStore( 4427):     at m.bkj.run(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):5)
W/MobStoreFlagStore( 4427):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
W/MobStoreFlagStore( 4427):     at java.util.concurrent.FutureTask.run(FutureTask.java:264)
W/MobStoreFlagStore( 4427):     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
W/MobStoreFlagStore( 4427):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
W/MobStoreFlagStore( 4427):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
W/MobStoreFlagStore( 4427):     at java.lang.Thread.run(Thread.java:1012)
W/MobStoreFlagStore( 4427): Caused by: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.felnanuke.google_cast_example, sha256=[2203a1459aa85c4445e23a53c388ba597b842d436710d1fab1d3a2b694e60d89], atk=false, ver=242335039.true (go/gsrlt)
W/MobStoreFlagStore( 4427):     at android.os.Parcel.createExceptionOrNull(Parcel.java:3011)
W/MobStoreFlagStore( 4427):     at android.os.Parcel.createException(Parcel.java:2995)
W/MobStoreFlagStore( 4427):     at android.os.Parcel.readException(Parcel.java:2978)
W/MobStoreFlagStore( 4427):     at android.os.Parcel.readException(Parcel.java:2920)
W/MobStoreFlagStore( 4427):     at m.rv.c(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):11)
W/MobStoreFlagStore( 4427):     at m.apg.a(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):39)
W/MobStoreFlagStore( 4427):     at m.adt.e(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):11)
W/MobStoreFlagStore( 4427):     at m.aeq.u(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):10)
W/MobStoreFlagStore( 4427):     at m.aeq.v(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):22)
W/MobStoreFlagStore( 4427):     at m.aeq.g(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):30)
W/MobStoreFlagStore( 4427):     at m.aeq.h(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):84)
W/MobStoreFlagStore( 4427):     at m.aeq.b(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):15)
W/MobStoreFlagStore( 4427):     at m.afz.c(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):97)
W/MobStoreFlagStore( 4427):     at m.aft.d(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):7)
W/MobStoreFlagStore( 4427):     at m.afu.handleMessage(:com.google.android.gms.dynamite_dynamitemodulesc@[email protected] (190408-0):277)
W/MobStoreFlagStore( 4427):     at android.os.Handler.dispatchMessage(Handler.java:106)
W/MobStoreFlagStore( 4427):     at android.os.Looper.loopOnce(Looper.java:201)
W/MobStoreFlagStore( 4427):     at android.os.Looper.loop(Looper.java:288)
W/MobStoreFlagStore( 4427):     at android.os.HandlerThread.run(HandlerThread.java:67)
Syncing files to device Realme 8...                                128ms

Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Realme 8 is available at: http://127.0.0.1:59835/Nad9UvCAejc=/
The Flutter DevTools debugger and profiler on Realme 8 is available at:
http://127.0.0.1:9104?uri=http://127.0.0.1:59835/Nad9UvCAejc=/
E/ion     ( 4427): ioctl c0044901 failed with code -1: Invalid argument
I/SessionManager( 4427): End session for com.felnanuke.google_cast_example
I/SessionManager( 4427): End session for com.felnanuke.google_cast_example
I/SessionManager( 4427): End session for com.felnanuke.google_cast_example```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants