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

ChromeOS #8

Closed
ghost opened this issue Apr 14, 2018 · 21 comments
Closed

ChromeOS #8

ghost opened this issue Apr 14, 2018 · 21 comments
Labels
question Further information is requested

Comments

@ghost
Copy link

ghost commented Apr 14, 2018

Has anyone tested this on ChromeOS ?

@MaikuB
Copy link
Owner

MaikuB commented Apr 15, 2018

Given that Flutter doesn't directly target Chrome OS, I'm assuming you're referring to testing when Android app is built using Flutter and this plugin? If so, then no as I personally don't have a Chromebook. I'm not familiar with the level of support ChromeOS for Android apps (which is what it should come down as the plugin will use the Android APIs) but if you have a ChromeOS device then you could check to see how well the example app runs.

@ghost
Copy link
Author

ghost commented Apr 19, 2018

Every flutter app i have tested runs on Chrome OS.

I will try it out here...

@MaikuB
Copy link
Owner

MaikuB commented Apr 19, 2018

Yep I've read that Flutter apps will run like the Flutter gallery. I meant I don't know about the level of support ChromeOS has for the Android APIs

@ghost
Copy link
Author

ghost commented Apr 20, 2018 via email

@MaikuB
Copy link
Owner

MaikuB commented Apr 20, 2018

No this has nothing to do with Flutter. I meant if one were to write Android app with Java/Kotlin (as an example) and use the notifications API, then I don't know if those notifications would work on ChromeOS. If it does work then I would expect it to work to for this plugin as well since it uses the same APIs. If it doesn't then there's no much I can do. I suggest you read the following links in case you haven't done so

https://flutter.io/platform-channels/
https://flutter.io/developing-packages/

Plugins such as mine essentially just provided a bridge to use the platform's native APIs, so there's actually Android code (using Java or Kotlin) and iOS code (using Swift or Objective C) that has to be written. So when you use my plugin to show a notification, it will actually fire almost the same Java code you would've had to write if you had developed your app entirely in Java. Hopefully that's clarified what I'm referring to.

On a different note, I've been cleaning up my plugin and will do another cleanup release soon. Unfortunately there are some breaking changes but they're more like fixing imports (that's already done in the latest release), renaming the plugin class and changing it so it will no longer be static. This is to facilitate mocking and testing when apps are using this plugin. Something I should've picked up on before so apologies for the inconvenience I'll be causing. I expect to be done with these changes and push out a new release within a day or the next few hours even

@ghost
Copy link
Author

ghost commented Apr 20, 2018 via email

@MaikuB
Copy link
Owner

MaikuB commented Apr 20, 2018

Sounds good :)

Just uploaded a new version btw so you should get the latest version

@ghost
Copy link
Author

ghost commented Apr 20, 2018

a little snafu on mac build
I am on the master channel BTW.

x-MacBook-Pro:example apple$ flutter run
Launching lib/main.dart on iPhone SE in debug mode...
Running Xcode clean...                                       1.6s
Starting Xcode build...
Xcode build done.                                            2.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    === BUILD TARGET flutter_local_notifications OF PROJECT Pods WITH CONFIGURATION Debug ===
    In file included from /Users/apple/workspace/go/src/github.com/MaikuB/flutter_local_notifications/ios/Classes/FlutterLocalNotificationsPlugin.m:1:
    /Users/apple/workspace/go/src/github.com/MaikuB/flutter_local_notifications/ios/Classes/FlutterLocalNotificationsPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone SE.


x-MacBook-Pro:dev apple$ flutter doctor -v
[✓] Flutter (Channel master, v0.3.3-pre.1, on Mac OS X 10.13.4 17E199, locale en-DE)
    • Flutter version 0.3.3-pre.1 at /Users/apple/workspace/flutter/flutter_macos_v0.2.8-beta/flutter
    • Framework revision 315993efb3 (3 hours ago), 2018-04-20 14:49:33 +0200
    • Engine revision 09d05a3891
    • Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/apple/Library/Android/sdk
    • Android NDK at /Users/apple/Library/Android/sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /Users/apple/Library/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_152-release-1024-b01)
    ✗ Android license status unknown.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 23.2.2
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.22.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.11.2

@ghost
Copy link
Author

ghost commented Apr 20, 2018

ah bummer
flutter/flutter#16036

2 options:

  1. rollback to 1.4 v of coccoapods
  • brew install cocoapods@1.4.0
  • pod setup

OR

  1. Update your ios/Podfile to be a copy of the latest Flutter project templates to work with Cocoapods 1.5.0.
    here they are:
    https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/cocoapods

@ghost
Copy link
Author

ghost commented Apr 20, 2018

so the good news is that cocoapods 1.4.0 no longer exists it seems.

so looks like option 2 is the way to go.
i did it here and noe it all builds.
would you mind upgrading the template ?

@MaikuB
Copy link
Owner

MaikuB commented Apr 20, 2018

I'm only going to build against the latest "stable" (beta 2, 0.2.8) You tried switching channels as well? Sounds like it fixes one person there. Just concerned on if updating the template will break it for others

@MaikuB
Copy link
Owner

MaikuB commented Apr 20, 2018

Should add I know I'll likely have to fix this soon.

Edit: sounds like the fix should be independent of whatever version of the Flutter SDK is installed, at least I hope so :)

I'll give it a shot then

@MaikuB
Copy link
Owner

MaikuB commented Apr 20, 2018

Ok took a look but the issue being reported and fix just applies to iOS head projects associated with a Flutter app. It doesn't apply to iOS projects associated with Flutter plugin don't seem to be affected as they don't have a Podfile. I don't think there's nothing I need to change for plugin. In fact, my example project was still building after I updated.

Perhaps your installation of the Flutter SDK from the master branch was before they pushed those new templates to master. If you were to update your installation and create a new app then I suspect the issue will be gone.

Edit: looks like the example is not running on an older simulator so I'll have to fix that

@MaikuB
Copy link
Owner

MaikuB commented Apr 21, 2018

Back to your original issue though, did you have much luck with ChromeOS?

@ghost
Copy link
Author

ghost commented Apr 22, 2018

Finally got a chance on Sunday night to try. Had to do my chores :)

SO it works on ChromeOS nicely.
The first 3 buttons work perfectly.
The 4th works on IOS, but not on ChromeOS. On ChromeOS it just does nothing.
The 5th and 6th do NOT work on ChromeOS. On ChromeOS it just does nothing.

If you want can hook it up and send whatever logs i get ?

@MaikuB
Copy link
Owner

MaikuB commented Apr 22, 2018

Sure you can but there's probably nothing I can do as I mentioned before. I'd suggest you try to create an Android app using only Java to see if you can reproduce the scenarios that aren't working in the example to see if it'll work. I'm pretty confident they won't as well on Chrome OS. Assuming this is the correct link, you can see that apps written directly for Chrome OS has fewer limited notification templates to select from https://developer.chrome.com/apps/notifications#type-TemplateType

@ghost
Copy link
Author

ghost commented Apr 23, 2018

The link you gave is for the Chrome Browser... Its the same for ChromeOS. I really doubt it.

Either way they are clearly eager to support it.
https://9to5google.com/2018/03/23/chrome-os-android-inline-notification-replies/

I was looking on saucelabs for a ChromeOS hardware device to make it easier for you but they dont have them yet. Anyway i can run it here if need be..

@MaikuB
Copy link
Owner

MaikuB commented Apr 23, 2018

Did you mean to say you doubt that it would work if you were do it entirely in Android?

@ghost
Copy link
Author

ghost commented Apr 23, 2018

thats not what i am getting at.

Basically it works on ChromeOS.. The last 3 dont, but the reason is because certain API's have not been ported to ChromeOS yet, but its clear that they will be. SO its better to just wait and get a Ci running against ChromeOS. Hence why i mentioned Saucelabs..

Saucelabs will be introducing Flutter and ChromeOS integration to the public. Its beta currently.

Hope this helps.

@MaikuB
Copy link
Owner

MaikuB commented Apr 23, 2018

Got it though though in the end it would also mean it wouldn't have worked if it was written in Android as well :)

I'm inclined to just close this as it's not an issue to do with the plugin or Flutter. Rather, it's a limitation of how well Chrome OS supports Android and it's APIs as per my initial reply

@MaikuB MaikuB added the question Further information is requested label Apr 23, 2018
@ghost
Copy link
Author

ghost commented Apr 23, 2018

cool ! closing and will see what happens on the ChromeOS side.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant