Java Code Examples for android.app.Notification#STREAM_DEFAULT

The following examples show how to use android.app.Notification#STREAM_DEFAULT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NotificationCompat.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Set the sound to play.  It will play on the default stream.
 */
public Builder setSound(Uri sound) {
    mNotification.sound = sound;
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    return this;
}
 
Example 2
Source File: NotificationCompat.java    From android-recipes-app with Apache License 2.0 4 votes vote down vote up
/**
 * Set the sound to play.  It will play on the default stream.
 */
public Builder setSound(Uri sound) {
    mNotification.sound = sound;
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    return this;
}
 
Example 3
Source File: NotificationCompat.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
/**
 * Set the sound to play.  It will play on the default stream.
 */
public Builder setSound(Uri sound) {
    mNotification.sound = sound;
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    return this;
}
 
Example 4
Source File: NotificationCompat.java    From guideshow with MIT License 4 votes vote down vote up
/**
 * Set the sound to play.  It will play on the default stream.
 */
public Builder setSound(Uri sound) {
    mNotification.sound = sound;
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    return this;
}
 
Example 5
Source File: NotificationCompat.java    From CodenameOne with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Constructor.
 *
 * Automatically sets the when field to {@link System#currentTimeMillis()
 * System.currentTimeMillis()} and the audio stream to the
 * {@link Notification#STREAM_DEFAULT}.
 *
 * @param context A {@link Context} that will be used to construct the
 *      RemoteViews. The Context will not be held past the lifetime of this
 *      Builder object.
 */
public Builder(Context context) {
    mContext = context;

    // Set defaults to match the defaults of a Notification
    mNotification.when = System.currentTimeMillis();
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    mPriority = PRIORITY_DEFAULT;
}
 
Example 6
Source File: NotificationCompat.java    From adt-leanback-support with Apache License 2.0 3 votes vote down vote up
/**
 * Constructor.
 *
 * Automatically sets the when field to {@link System#currentTimeMillis()
 * System.currentTimeMillis()} and the audio stream to the
 * {@link Notification#STREAM_DEFAULT}.
 *
 * @param context A {@link Context} that will be used to construct the
 *      RemoteViews. The Context will not be held past the lifetime of this
 *      Builder object.
 */
public Builder(Context context) {
    mContext = context;

    // Set defaults to match the defaults of a Notification
    mNotification.when = System.currentTimeMillis();
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    mPriority = PRIORITY_DEFAULT;
    mPeople = new ArrayList<String>();
}
 
Example 7
Source File: NotificationCompat.java    From android-recipes-app with Apache License 2.0 3 votes vote down vote up
/**
 * Constructor.
 *
 * Automatically sets the when field to {@link System#currentTimeMillis()
 * System.currentTimeMillis()} and the audio stream to the
 * {@link Notification#STREAM_DEFAULT}.
 *
 * @param context A {@link Context} that will be used to construct the
 *      RemoteViews. The Context will not be held past the lifetime of this
 *      Builder object.
 */
public Builder(Context context) {
    mContext = context;

    // Set defaults to match the defaults of a Notification
    mNotification.when = System.currentTimeMillis();
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    mPriority = PRIORITY_DEFAULT;
}
 
Example 8
Source File: NotificationCompat.java    From V.FlyoutTest with MIT License 3 votes vote down vote up
/**
 * Constructor.
 *
 * Automatically sets the when field to {@link System#currentTimeMillis()
 * System.currentTimeMillis()} and the audio stream to the
 * {@link Notification#STREAM_DEFAULT}.
 *
 * @param context A {@link Context} that will be used to construct the
 *      RemoteViews. The Context will not be held past the lifetime of this
 *      Builder object.
 */
public Builder(Context context) {
    mContext = context;

    // Set defaults to match the defaults of a Notification
    mNotification.when = System.currentTimeMillis();
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    mPriority = PRIORITY_DEFAULT;
}
 
Example 9
Source File: NotificationCompat.java    From guideshow with MIT License 3 votes vote down vote up
/**
 * Constructor.
 *
 * Automatically sets the when field to {@link System#currentTimeMillis()
 * System.currentTimeMillis()} and the audio stream to the
 * {@link Notification#STREAM_DEFAULT}.
 *
 * @param context A {@link Context} that will be used to construct the
 *      RemoteViews. The Context will not be held past the lifetime of this
 *      Builder object.
 */
public Builder(Context context) {
    mContext = context;

    // Set defaults to match the defaults of a Notification
    mNotification.when = System.currentTimeMillis();
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    mPriority = PRIORITY_DEFAULT;
}
 
Example 10
Source File: NotificationCompat.java    From adt-leanback-support with Apache License 2.0 2 votes vote down vote up
/**
 * Set the sound to play.  It will play on the default stream.
 *
 * <p>
 * On some platforms, a notification that is noisy is more likely to be presented
 * as a heads-up notification.
 * </p>
 */
public Builder setSound(Uri sound) {
    mNotification.sound = sound;
    mNotification.audioStreamType = Notification.STREAM_DEFAULT;
    return this;
}