Created
June 24, 2019 08:13
-
-
Save sbis04/f660e5d2798b03d9e0d2926924acf3cb to your computer and use it in GitHub Desktop.
flutter_os_main_activity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity: FlutterActivity(), AmbientMode.AmbientCallbackProvider { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
GeneratedPluginRegistrant.registerWith(this) | |
// Wire up the activity for ambient callbacks | |
AmbientMode.attachAmbientSupport(this) | |
} | |
override fun getAmbientCallback(): AmbientMode.AmbientCallback { | |
return FlutterAmbientCallback(getChannel(flutterView)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment