We constantly publish updates to our documentation, which may not yet be available in your language. For the most current information, use the English version.
import com.adjust.sdk.flutter.AdjustSdk
import io.flutter.embedding.android.FlutterActivity
// Used for post flutter 1.12 Android projects
//import io.flutter.app.FlutterActivity
class MainActivity : FlutterActivity() {
// Either call make the call in onCreate.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// GeneratedPluginRegistrant.registerWith(this)
// Used only for pre flutter 1.12 Android projects
Intent intent = getIntent()
Uri data = intent.getData()
AdjustSdk.appWillOpenUrl(data, this)
}
// Or make the call in onNewIntent.
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
Uri data = intent.getData()
AdjustSdk.appWillOpenUrl(data, this)
}
}