package com.ee.firebase.core;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import androidx.annotation.NonNull;

import com.ee.core.Logger;
import com.ee.core.PluginProtocol;

/**
 * Created by Zinge on 7/4/16.
 */
public class Firebase implements PluginProtocol {
    private static final Logger _logger = new Logger(Firebase.class.getName());

    private native void setActivity(Object activity);

    public Firebase() {
        _logger.debug("constructor begin.");
        _logger.debug("constructor end.");
    }

    @NonNull
    @Override
    public String getPluginName() {
        return "Firebase";
    }

    @Override
    public void onCreate(@NonNull Activity activity) {
        setActivity(activity);
    }

    @Override
    public void onStart() {
    }

    @Override
    public void onStop() {
    }

    @Override
    public void onResume() {
    }

    @Override
    public void onPause() {
    }

    @Override
    public void onDestroy() {
    }

    @Override
    public void destroy() {
    }

    @Override
    public boolean onActivityResult(int requestCode, int responseCode, Intent data) {
        return false;
    }

    @Override
    public boolean onBackPressed() {
        return false;
    }
}

@@ -214,16 +214,56 @@
 rotocol;
+%0Aimport com.google.firebase.FirebaseApp;
 %0A%0A/**%0A *
@@ -501,16 +501,31 @@
 irebase(
+Context context
 ) %7B%0A    
@@ -561,24 +561,68 @@
 r begin.%22);%0A
+        FirebaseApp.initializeApp(context);%0A
         _log

Add FirebaseApp.initializeApp(context) (like in iOS).