What's going on when I'm learning the status bar notification, when I get a dash off the code?
For example:
Package Com.example.notification;import Android.app.activity;import Android.app.alertdialog;import Android.app.notification;import Android.app.notificationmanager;import Android.app.pendingintent;import Android.content.context;import Android.content.dialoginterface;import Android.content.intent;import Android.net.uri;import Android.os.bundle;import Android.view.view;import Android.widget.button;public class Mainactivity extends Activity {@Overridepublic void onCreate (Bundle savedinstancestate) {super.oncreate ( Savedinstancestate); Setcontentview (R.layout.activity_main); Button button = (button) Findviewbyid (R.id.button); Button.setonclicklistener (new View.onclicklistener () {@ Suppresswarnings ("deprecation") @Overridepublic void OnClick (View v) {Notificationmanager Mnotificationmanager = ( Notificationmanager) Getsystemservice (context.notification_service); int icon = Android. R.drawable.sym_action_email;long when = System.currenttimemillis (); Notification Notification = new Notification (icon, NULL, when); notification.defaults = Notification.default_sound; Pendingintent contentintent = pendingintent.getactivity (mainactivity.this, 0, NULL, 0); Notification.setlatesteventinfo (mainactivity.this, "status bar Notification Test", "Morning 11:02", contentintent); Mnotificationmanager.notify (0, notification);}});}}
Cause: This is used previously, is not currently in use or has changed, is not recommended, but does not affect the operation of the program
The question comes again, if it is changed, what is changed? I didn't find ...
Android: What does it mean when the code is crossed out in development?