Search in sources :

Example 81 with Intent

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);
}
Also used : Intent(android.content.Intent)

Example 82 with Intent

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);
    }
}
Also used : Intent(android.content.Intent)

Example 83 with Intent

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);
    }
}
Also used : Intent(android.content.Intent)

Example 84 with Intent

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));
}
Also used : Intent(android.content.Intent)

Example 85 with Intent

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);
    }
}
Also used : ResolveInfo(android.content.pm.ResolveInfo) PackageManager(android.content.pm.PackageManager) Intent(android.content.Intent) ComponentName(android.content.ComponentName)

Aggregations

Intent (android.content.Intent)30598 PendingIntent (android.app.PendingIntent)4802 Test (org.junit.Test)2560 View (android.view.View)2527 Bundle (android.os.Bundle)2094 ComponentName (android.content.ComponentName)1706 TextView (android.widget.TextView)1660 Uri (android.net.Uri)1607 Context (android.content.Context)1506 ResolveInfo (android.content.pm.ResolveInfo)1397 PackageManager (android.content.pm.PackageManager)1125 ArrayList (java.util.ArrayList)1067 IntentFilter (android.content.IntentFilter)917 ImageView (android.widget.ImageView)904 ActivityNotFoundException (android.content.ActivityNotFoundException)859 File (java.io.File)823 RemoteException (android.os.RemoteException)786 DialogInterface (android.content.DialogInterface)752 IOException (java.io.IOException)742 SharedPreferences (android.content.SharedPreferences)665