use of android.content.Intent in project cw-omnibus by commonsguy.
the class StaticFragmentsDemoActivity method showOther.
public void showOther(View v) {
Intent other = new Intent(this, OtherActivity.class);
other.putExtra(OtherActivity.EXTRA_MESSAGE, getString(R.string.other));
startActivity(other);
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class EmPubLiteActivity method showHelp.
private void showHelp() {
if (sidebar != null) {
openSidebar();
if (help == null) {
help = SimpleContentFragment.newInstance(FILE_HELP);
}
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.sidebar, help, HELP).commit();
} else {
Intent i = new Intent(this, SimpleContentActivity.class);
i.putExtra(SimpleContentActivity.EXTRA_FILE, FILE_HELP);
startActivity(i);
}
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class EmPubLiteActivity method showAbout.
private void showAbout() {
if (sidebar != null) {
openSidebar();
if (about == null) {
about = SimpleContentFragment.newInstance(FILE_ABOUT);
}
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.sidebar, about, ABOUT).commit();
} else {
Intent i = new Intent(this, SimpleContentActivity.class);
i.putExtra(SimpleContentActivity.EXTRA_FILE, FILE_ABOUT);
startActivity(i);
}
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class LocalActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
notice = (TextView) findViewById(R.id.notice);
startService(new Intent(this, NoticeService.class));
}
use of android.content.Intent in project cw-omnibus by commonsguy.
the class StopReceiver method onReceive.
@Override
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context.getString(R.string.service_action)).setPackage(context.getPackageName());
PackageManager mgr = context.getPackageManager();
for (ResolveInfo ri : mgr.queryIntentServices(i, 0)) {
ComponentName cn = new ComponentName(ri.serviceInfo.applicationInfo.packageName, ri.serviceInfo.name);
Intent stop = new Intent().setComponent(cn);
context.stopService(stop);
}
}
Aggregations