Code example for Context

Methods: startActivity

0
                ", text: " + notif.text);
 
        mContext.startActivity(intent);
    } 
 
    // Construct the intent for bringing up the dialog activity, which shows the  
    // notification and takes user input 
    private Intent getDlgIntent(GpsNiNotification notif)
    { 
        Intent intent = new Intent();
        String title = getDialogTitle(notif, mContext);
        String message = getDialogMessage(notif, mContext);
 
        // directly bring up the NI activity 
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);
 
        // put data in the intent 
        intent.putExtra(NI_INTENT_KEY_NOTIF_ID, notif.notificationId);
        intent.putExtra(NI_INTENT_KEY_TITLE, title);
        intent.putExtra(NI_INTENT_KEY_MESSAGE, message);