package com.mobile.flutter_app;

import android.util.Log;

import com.app.artful.ArtfulLibraryHelper;

import io.flutter.embedding.android.FlutterActivity;

public class MainActivity extends FlutterActivity {
    @Override
    protected void onStart() {
        super.onStart();

//        System.loadLibrary("artful");
//        ArtfulLibraryHelper.registerNativeMethodsForClass(MainActivity.class);
//
//        // Call by object or signature
//        try {
//            replaceLogEByObject(MainActivity.class.getDeclaredMethod("newMethod", String.class, String.class));
//        } catch (NoSuchMethodException e) {
//            throw new RuntimeException(e);
//        }
//
//        // New invocations below will actually trigger newMethod
//        Log.e("ARTful", "I'm benign");
    }

    public native void replaceLogEByObject(Object newObject);

    public static int newMethod(String tag, String msg) {
        Log.d("ARTful", "I should not execute >:)");

        // Your code goes here!
        return 1;
    }
}
