Package android.app

Examples of android.app.Notification


        try {
            // create  manager
            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 );

            // add notification to manager so it shows up for the user
            manager.notify( APP_NOTIFICAION, notification );

            // set enabled to true
View Full Code Here

TOP

Related Classes of android.app.Notification

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.