title: Issue with Notification Manager on android
body: <p>I'm trying to notify using a button, but both Notification and setLatestEventInfo is deprecated.</p>
  
  <p>Two errors:</p>
  
  <p>1.The constructor Notification(int, CharSequence, long) is deprecated <code>Notification notify = new Notification(android.R.drawable.stat_notify_more, "Hello all", System.currentTimeMillis());</code></p>
  
  <p>2.The method <code>setLatestEventInfo(Context, CharSequence, CharSequence, PendingIntent)</code> in the type Notification is not applicable for the arguments <code>(Context, CharSequence, CharSequence, Intent) notify.setLatestEventInfo(context, title, details, intent);</code></p>
  
  <pre><code>public class MainActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Button b = (Button) findViewById(R.id.button1);
      b.setOnClickListener(new View.OnClickListener() {   
          @Override
          public void onClick(View v) {
              NotificationManager ns = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
              Notification notify = new Notification(android.R.drawable.stat_notify_more, "Hello all", System.currentTimeMillis());
              Context context = MainActivity.this;
              CharSequence title ="you have be notified";
              CharSequence details = "Continue your work";
              Intent intent = new Intent(context,MainActivity.class);
              PendingIntent pending = PendingIntent.getActivity(context, 0, intent, 0);
              notify.setLatestEventInfo(context, title, details, intent);
              ns.notify(0,notify);
  
  
          }
      });
  }
  </code></pre>
  
  <p>API LEVELS:</p>
  
  <pre><code>       android:minSdkVersion="11"
         android:targetSdkVersion="17"
  </code></pre>
  
  <p>What is the alternative?</p>