I am trying to use a plugin for background location tracking on Android. Capacitor is supposed to register the plugin automatically in MainActivity.java, but that's not happening. I tried to do that manually, but that is also not happening.
package com.siloc.users;
import com.getcapacitor.BridgeActivity;
import android.os.Bundle;
import com.getcapacitor.BridgeActivity;
import com.getcapacitor.Plugin;
import java.util.ArrayList;
import com.hemangkumar.capacitorgooglemaps.CapacitorGoogleMaps;
import com.equimaps.capacitor_background_geolocation.BackgroundGeolocation;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
registerPlugin(CapacitorGoogleMaps.class);
registerPlugin(BackgroundGeolocation.class);
}
}
How can I do that?