Android 技巧 - notification center 发出通知时显示文字


this.mBuilder =
       new NotificationCompat.Builder(this)
       .setSmallIcon(R.drawable.ic_launcher)
       .setContentTitle("My notification")
       .setLargeIcon(largeIcon)
       .setAutoCancel(true)
       .setTicker("This is a notification")
       .setContentText("Hello World!");

--------------

The NotificationCompat.Builder class has method setTicker() that allows you to do that.

你可能感兴趣的:(android,notification)