Package android.content

Examples of android.content.Intent


            manager = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE );
            icon = android.R.drawable.stat_sys_upload;
            tickerText = "Uploading: " + filename;
            flags |= super.FLAG_ONGOING_EVENT;
            contentView = new RemoteViews( context.getPackageName(), R.layout.upload );
            Intent intent = new Intent( context, this.getClass() );
            contentIntent = PendingIntent.getActivity( context, 0, intent, 0 );

            // set fields in the custom view
            contentView.setImageViewResource( R.id.uploadImage, android.R.drawable.stat_sys_upload );
            contentView.setTextViewText( R.id.uploadText, "Uploading: " + filename );
View Full Code Here


            case MENU_BACK:
                moveTaskToBack( true );
                break;
            // start user preferences screen
            case MENU_PREFS:
                startActivity( new Intent( this, EditPreferences.class ) );
                break;
            // show license
            case MENU_LICENSE:
                Utils.textDialog( this, "License Information", getString( R.string.license ) );
                break;
View Full Code Here

            manager = (NotificationManager) context.getSystemService( Context.NOTIFICATION_SERVICE );

            // create notificaion, flags and intent
            Notification notification = new Notification( R.drawable.uploader, null, System.currentTimeMillis() );
            notification.flags |= Notification.FLAG_ONGOING_EVENT;
            Intent notificationIntent = new Intent( context, MiltonPhotoUploader.class );
            PendingIntent contentIntent = PendingIntent.getActivity( context, 0, notificationIntent, 0 );

            // add event info to notification
            notification.setLatestEventInfo( context, context.getString( R.string.app_name ), context.getString( R.string.app_name ) + " is running.", contentIntent );
View Full Code Here

    return null;
  }

  protected void showChooser() {
    Intent chooser = new Intent(this, OpenSocialChooserActivity.class);

    String[] providers = providerClasses.keySet().toArray(new String[] {});
    chooser.putExtra(PROVIDERS, providers);
    chooser.putExtra(SCHEME, scheme);

    for (String name : providers) {
      chooser.putExtra(name + CREDENTIALS, providerCredentials.get(name));
      chooser.putExtra(name + CLASS, providerClasses.get(name));
    }

    startActivity(chooser);
  }
View Full Code Here

            throw new RuntimeException("Error occured fetching request token", e);
          } catch (OAuthException e) {
            throw new RuntimeException("Error occured fetching request token", e);
          }

          Intent i = new Intent(Intent.ACTION_VIEW);
          i.setData(Uri.parse(url));
          startActivity(i);

          finish();
        }
      });
View Full Code Here

TOP

Related Classes of android.content.Intent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.