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

Kotlin example code for new users #98

Closed
chall3ng3r opened this issue Mar 11, 2024 · 0 comments
Closed

Kotlin example code for new users #98

chall3ng3r opened this issue Mar 11, 2024 · 0 comments

Comments

@chall3ng3r
Copy link

Just wanted to suggest small update. New app created with Flutter doesn't contain all the required imports and a complete override example shows how it should like in final form inside class.

The Kotlin suggested example code:

import android.content.Intent
import id.laskarmedia.openvpn_flutter.OpenVPNFlutterPlugin

class MainActivity: FlutterActivity() {
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        OpenVPNFlutterPlugin.connectWhileGranted(requestCode == 24 && resultCode == RESULT_OK)
        super.onActivityResult(requestCode, resultCode, data)
    }
}
@nizwar nizwar closed this as completed Jun 20, 2024
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

2 participants