[Java for Android App Development] rapsong11:
Here is my code:

package com.d4a.SchoolLauncher;
import java.util.List;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.widget.HorizontalScrollView;
import android.widget.ImageButton;
import android.widget.ScrollView;
import android.content.Context;
import com.d4a.SchoolLauncher.R;

public class LauncherActivity extends Activity{

[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//scroller
final HorizontalScrollView scroller= (HorizontalScrollView) findViewById(R.id.scroller);

scroller.setSmoothScrollingEnabled(true);

//apps
final ImageButton apps= (ImageButton) findViewById(R.id.all_apps); //my all apps button

apps.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]
public void onClick(View v) {
Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
PackageManager packageManager = context.getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(mainIntent, 0);

}
});

final ImageButton wbrowser= (ImageButton) findViewById(R.id.wbrowser);

wbrowser.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]
public void onClick(View v) {
String url = "http://www.google.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});

final ImageButton osettings= (ImageButton) findViewById(R.id.osettings);

osettings.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]
public void onClick(View v) {
startActivity(new Intent(Settings.ACTION_SETTINGS));
}
});

//remove from home screen button

//apps
final ImageButton delapps= (ImageButton) findViewById(R.id.delapps);

delapps.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {
apps.setVisibility(View.GONE);
delapps.setVisibility(View.GONE);

}
});

//web browser
final ImageButton delwbrowser= (ImageButton) findViewById(R.id.delwbrowser);

delwbrowser.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {
wbrowser.setVisibility(View.GONE);
delwbrowser.setVisibility(View.GONE);

}
});

//web browser
final ImageButton delosettings= (ImageButton) findViewById(R.id.dellosettings);

delosettings.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {
osettings.setVisibility(View.GONE);
delosettings.setVisibility(View.GONE);

}
});

//add button
final ImageButton addshortcut= (ImageButton) findViewById(R.id.addshortcut);

addshortcut.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {
startActivity(new Intent("com.PhysicsPhantom.Launcher"));

}
});
//done button
final ImageButton done= (ImageButton) findViewById(R.id.done);

done.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]

public void onClick(View v) {
delwbrowser.setVisibility(View.GONE);
delosettings.setVisibility(View.GONE);
delapps.setVisibility(View.GONE);
done.setVisibility(View.GONE);
addshortcut.setVisibility(View.GONE);
}
});

//edit button
final ImageButton edit= (ImageButton) findViewById(R.id.edit);

edit.setOnClickListener(new View.OnClickListener() {

[MENTION=439709]override[/MENTION]
public void onClick(View v) {
if (apps.getVisibility()==View.VISIBLE){
delapps.setVisibility(View.VISIBLE);
}
if (wbrowser.getVisibility()==View.VISIBLE){
delwbrowser.setVisibility(View.VISIBLE);
}
if (osettings.getVisibility()==View.VISIBLE){
delosettings.setVisibility(View.VISIBLE);
}

done.setVisibility(View.VISIBLE);
addshortcut.setVisibility(View.VISIBLE);

}
});

//code to open editor for all delete buttons

//apps
apps.setOnLongClickListener(new View.OnLongClickListener() {

[MENTION=439709]override[/MENTION]

public boolean onLongClick(View v) {
if (delapps.getVisibility()==View.GONE){
delapps.setVisibility(View.VISIBLE);
}
else{
delapps.setVisibility(View.GONE);
}

return true;

}
});

//web browser
wbrowser.setOnLongClickListener(new View.OnLongClickListener() {

[MENTION=439709]override[/MENTION]

public boolean onLongClick(View v) {
if (delwbrowser.getVisibility()==View.GONE){
delwbrowser.setVisibility(View.VISIBLE);
}
else{
delwbrowser.setVisibility(View.GONE);
}

return true;

}
});

//settings
osettings.setOnLongClickListener(new View.OnLongClickListener() {

[MENTION=439709]override[/MENTION]

public boolean onLongClick(View v) {
if (delosettings.getVisibility()==View.GONE){
delosettings.setVisibility(View.VISIBLE);
scroller.fullScroll(ScrollView.FOCUS_RIGHT);
}
else{
delosettings.setVisibility(View.GONE);
}

return true;

}
});

}
}

I get a error at: PackageManager packageManager = context.getPackageManager();

The error is as follows: context cannot be resolved

please help!!