Skip to content

AppCheck - no MainActivity.java file in project as per install instructions #6468

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

Closed
Zelfapp opened this issue Jun 24, 2021 Discussed in #6467 · 3 comments
Closed

AppCheck - no MainActivity.java file in project as per install instructions #6468

Zelfapp opened this issue Jun 24, 2021 Discussed in #6467 · 3 comments
Labels
plugin: app_check type: documentation Improvements or additions to documentation

Comments

@Zelfapp
Copy link

Zelfapp commented Jun 24, 2021

Discussed in #6467

Originally posted by Zelfapp June 24, 2021
Install instructions mention a MainActivity.java file to update. However, my Flutter project has no MainActivity.java. The instructions need to be updated for how to handle this situation. Where do I put the MainActivity.java file if no file exists or do I update MainActivity.kt that does exist, and if so what is the code for that?

image

image

I've tried running flutter create . as many SO posts have suggested, but this does not create a MainActivity.java file in the project.

The contents of my android/app/src/main/kotlin/com/mysite/myapp/MainActivity.kt file:

package com.mysite.myapp

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}
@markusaksli-nc markusaksli-nc added triage Issue is currently being triaged. plugin: app_check type: documentation Improvements or additions to documentation and removed triage Issue is currently being triaged. labels Jun 25, 2021
@PaulRudin
Copy link

The suggested changes to MainActivity.java seem to be unconditional with respect to the kind of build.

Presumably the debug app check provider should be referenced only in debug builds not release builds? But the instructions don't address how to do this.

@cedvdb
Copy link

cedvdb commented Jul 27, 2021

there needs to be a kotlin snippet in the documentation as well

@russellwheatley
Copy link
Member

Hi there, we fully accept PRs if anyone is able to produce a Kotlin sample and update the documentation. We already have an issue tracking this very problem: #2311

I'll close this and suggest a thumbs up for that issue. Thanks.

@firebase firebase locked and limited conversation to collaborators Jan 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: app_check type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants