Code example for Intent

Methods: getServiceputExtrasetAction

    // PendingIntents are compared without reference to their extras. Therefore 
    // even though we pass the profile details to the action, different 
    // profiles will share the *same* pending intent. In a multi-profile future, 
    // this will need to be addressed.  See Bug 882182. 
    final Intent service = new Intent(context, serviceClass);
    service.setAction("upload"); // PendingIntents "lose" their extras if no action is set.
    service.putExtra("uploadEnabled", enabled);
    service.putExtra("profileName", profileName);
    service.putExtra("profilePath", profilePath);
    final PendingIntent pending = PendingIntent.getService(context, 0, service, PendingIntent.FLAG_CANCEL_CURRENT);
    if (!serviceEnabled) {
    final long pollInterval = getSubmissionPollInterval();
    scheduleAlarm(pollInterval, pending);
Stop searching for code, let great code find you!  Add Codota to your java IDE