Vibrate and Sound defaults on notification

后端 未结 9 1164
天涯浪人
天涯浪人 2020-12-04 07:37

I\'m trying to get a default vibrate and sound alert when my notification comes in, but so far no luck. I imagine it\'s something to do with the way I set the defaults, but

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 08:11

    // set notification audio

    builder.setDefaults(Notification.DEFAULT_VIBRATE);
    //OR 
    builder.setDefaults(Notification.DEFAULT_SOUND);
    

提交回复
热议问题