baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Step 2 Issues #208

Open Zensynthium opened 2 years ago

Zensynthium commented 2 years ago

I'm having issues with Step 2:

In file android/app/src/main/java/.../MainActivity.java add the reference to the Capacitor Firebase Auth plugin inside the Bridge initialization.

[...] import com.baumblatt.capacitor.firebase.auth.CapacitorFirebaseAuth; // Initializes the Bridge this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ // Additional plugins you've installed go here // Ex: add(TotallyAwesomePlugin.class); add(CapacitorFirebaseAuth.class); }}); [...]

I put the code in the MainActivity.java but it throws errors. My MainActivity.java looks like this after I've added it.

` package io.ionic.goal_tracker;

import com.getcapacitor.BridgeActivity;

import com.baumblatt.capacitor.firebase.auth.CapacitorFirebaseAuth; // Initializes the Bridge this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ // Additional plugins you've installed go here // Ex: add(TotallyAwesomePlugin.class); add(CapacitorFirebaseAuth.class); }});

public class MainActivity extends BridgeActivity {} `

Any clarification would be much appreciated, thank you!

LynearIngression commented 2 years ago

I think they changed it so that you don't have to initialize this anymore. It will do it automatically.

package com.mypackage.app import com.getcapacitor.BridgeActivity; public class MainActivity extends BridgeActivity {

}