Java

Kotlin

public

class

MyActivity

extends

FragmentActivity

// Define a tag String to represent the FlutterFragment within this

// Activity's FragmentManager. This value can be whatever you'd like.

private

static

final

String

TAG_FLUTTER_FRAGMENT

"flutter_fragment"

// Declare a local variable to reference the FlutterFragment so that you

// can forward calls to it later.

private

FlutterFragment

flutterFragment

@Override

protected

void

onCreate

Bundle

savedInstanceState

super

onCreate

savedInstanceState

);