<NME> WaypointPopup.java
<BEF> package cgeo.geocaching;

import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.utils.Log;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.AndroidRuntimeException;
import android.view.Window;

import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import android.widget.TextView;

public class WaypointPopup extends AbstractPopupActivity {
    private static final String EXTRA_WAYPOINT_ID = "waypoint_id";
    private int waypointId = 0;
    private Waypoint waypoint = null;

    public void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        try {
            supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        } catch (final AndroidRuntimeException ex) {
            Log.e("Error requesting no title feature", ex);
        }
        // get parameters
        final Bundle extras = getIntent().getExtras();
        if (extras != null) {
            waypointId = extras.getInt(EXTRA_WAYPOINT_ID);
        }
    }

        showDialog();
    }

    public static void startActivity(final Context context, final int waypointId, final String geocode) {
        final Intent popupIntent = new Intent(context, WaypointPopup.class);
        popupIntent.putExtra(Intents.EXTRA_WAYPOINT_ID, waypointId);
        popupIntent.putExtra(Intents.EXTRA_GEOCODE, geocode);

        context.startActivity(popupIntent);
    }

    public static void startActivityAllowTarget(final Activity activity, final int waypointId, final String geocode) {
        final Intent popupIntent = new Intent(activity, WaypointPopup.class);
        popupIntent.putExtra(Intents.EXTRA_WAYPOINT_ID, waypointId);
        popupIntent.putExtra(Intents.EXTRA_GEOCODE, geocode);

        activity.startActivityForResult(popupIntent, AbstractDialogFragment.REQUEST_CODE_TARGET_INFO);
    }

    void showDialog() {
        // DialogFragment.show() will take care of adding the fragment
        // in a transaction.  We also want to remove any currently showing
        // dialog, so make our own transaction and take care of that here.
        final FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        final Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog");
        if (prev != null) {
            ft.remove(prev);
        }
        ft.addToBackStack(null);

        // Create and show the dialog.
        final DialogFragment newFragment = WaypointPopupFragment.newInstance(geocode, waypointId);
        newFragment.show(ft, "dialog");
    }


}

    public static void startActivity(final Context context, final int waypointId, final String geocode) {
        final Intent popupIntent = new Intent(context, WaypointPopup.class);
        popupIntent.putExtra(EXTRA_WAYPOINT_ID, waypointId);
        popupIntent.putExtra(EXTRA_GEOCODE, geocode);
        context.startActivity(popupIntent);
    }


<MSG> Isolate intent extras into a new class

<DFF> @@ -17,7 +17,6 @@ import android.widget.LinearLayout;
 import android.widget.TextView;
 
 public class WaypointPopup extends AbstractPopupActivity {
-    private static final String EXTRA_WAYPOINT_ID = "waypoint_id";
     private int waypointId = 0;
     private Waypoint waypoint = null;
 
@@ -31,7 +30,7 @@ public class WaypointPopup extends AbstractPopupActivity {
         // get parameters
         final Bundle extras = getIntent().getExtras();
         if (extras != null) {
-            waypointId = extras.getInt(EXTRA_WAYPOINT_ID);
+            waypointId = extras.getInt(Intents.EXTRA_WAYPOINT_ID);
         }
     }
 
@@ -97,8 +96,8 @@ public class WaypointPopup extends AbstractPopupActivity {
 
     public static void startActivity(final Context context, final int waypointId, final String geocode) {
         final Intent popupIntent = new Intent(context, WaypointPopup.class);
-        popupIntent.putExtra(EXTRA_WAYPOINT_ID, waypointId);
-        popupIntent.putExtra(EXTRA_GEOCODE, geocode);
+        popupIntent.putExtra(Intents.EXTRA_WAYPOINT_ID, waypointId);
+        popupIntent.putExtra(Intents.EXTRA_GEOCODE, geocode);
         context.startActivity(popupIntent);
     }
 

Isolate intent extras into a new class