Light + vibration added for notification

This commit is contained in:
massimiliano 2018-12-20 21:02:16 +01:00
parent dce235fd7c
commit 78b802b8e9
1 changed files with 3 additions and 1 deletions

View File

@ -1942,7 +1942,9 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
.setContentInfo(message)//get text message from json :-)
.setContentIntent(launchStateMessages);
Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
mBuilder.setSound(alarmSound);
mBuilder.setSound(alarmSound)
.setVibrate(new long[]{50,500,100,300,50,300})
.setLights(Color.MAGENTA, 3000, 3000);
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(001, mBuilder.build());