How to reference Activity from different package?
<p>I have a class that extends Activity which I want to reference. How can I do this? I'm learning Android.</p>

<pre><code>package com.android.flash;

import com.android.flashminigame.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class MinigameNativeActivity extends Activity {
    private static final String MINIGAME_ID_KEY = "com.lib.MINIGAME_ID_KEY";

    private static final String DIFFICULTY_KEY = "com.lib.INIT_DIFFICULTY_KEY";
    private static final String MIN_MPPM_KEY = "com.lib.INIT_MIN_MPPM_KEY";
    private static final String MAX_MPPM_KEY = "com.lib.INIT_MAX_MPPM_KEY";
    private static final String EXTRA_ARGS_KEY = "com.lib.INIT_EXTRA_ARGS_KEY";

    int launchID;
    int difficulty;
    int minMPPM;
    int maxMPPM;
    String extraArgs;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        storeLaunchArguments();
    }

    private void storeLaunchArguments() {
        // Get the launch arguments.
        Intent launchIntent = getIntent();
        launchID = launchIntent.getIntExtra(MINIGAME_ID_KEY, 0);
        difficulty = launchIntent.getIntExtra(DIFFICULTY_KEY, 0);
        minMPPM = launchIntent.getIntExtra(MIN_MPPM_KEY, 0);
        maxMPPM = launchIntent.getIntExtra(MAX_MPPM_KEY, 0);
        extraArgs = launchIntent.getStringExtra(EXTRA_ARGS_KEY);
    }
}
</code></pre>

<p>I wish to be able to reference launchID, difficulty, etc. from the above class. From the following class:</p>

<pre><code>   package com.android.flash.extensions;

import android.util.Log;

import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREObject;
import com.android.flash.MinigameNativeActivity;

public class MinigameFunctions implements FREFunction {
    // should be the same as constants in Minigame.as
    public static final int LAUNCH_ID = 0;
    public static final int DIFFICULTY = 1;

    public FREObject call(FREContext context, FREObject[] passedArgs) {
                    MinigameExtensionContext minigameContext = (MinigameExtensionContext)context;
            Activity a = minigameContext.getActivity();

        FREObject result = null;

        try {
            FREObject fro = passedArgs[0];
            int arg = fro.getAsInt();

            Log.d("--&gt;", "arg:"+arg);
            if(arg == LAUNCH_ID) {
                Log.d("--&gt;", "MinigameNativeActivity.launchID:"+launchID);
                result = FREObject.newObject(launchID);
            }
            else if(arg == DIFFICULTY) {
                Log.d("--&gt;", "MinigameNativeActivity.difficulty:"+difficulty);
                result = FREObject.newObject(difficulty);
            }
        }
        catch (Exception e) {
            e.printStackTrace(); 
        }

        Log.d("--&gt;", "result:"+result);
        return result;
    }
}
</code></pre>
