Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
57049bc9
Commit
57049bc9
authored
Sep 30, 2018
by
Sajal Narang
Committed by
GitHub
Sep 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #211 from pulsejet/patch21
Fix notification style, LED color on marshmallow
parents
1ee38d97
4b14aafa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/src/main/java/app/insti/InstiAppFirebaseMessagingService.java
...main/java/app/insti/InstiAppFirebaseMessagingService.java
+1
-0
app/src/main/java/app/insti/activity/MainActivity.java
app/src/main/java/app/insti/activity/MainActivity.java
+2
-2
No files found.
app/src/main/java/app/insti/InstiAppFirebaseMessagingService.java
View file @
57049bc9
...
@@ -120,6 +120,7 @@ public class InstiAppFirebaseMessagingService extends FirebaseMessagingService {
...
@@ -120,6 +120,7 @@ public class InstiAppFirebaseMessagingService extends FirebaseMessagingService {
.
setColor
(
getResources
().
getColor
(
R
.
color
.
colorPrimary
))
.
setColor
(
getResources
().
getColor
(
R
.
color
.
colorPrimary
))
.
setVibrate
(
new
long
[]{
0
,
200
})
.
setVibrate
(
new
long
[]{
0
,
200
})
.
setSound
(
soundUri
)
.
setSound
(
soundUri
)
.
setLights
(
Color
.
BLUE
,
500
,
500
)
.
setAutoCancel
(
true
)
.
setAutoCancel
(
true
)
.
setPriority
(
NotificationCompat
.
PRIORITY_DEFAULT
);
.
setPriority
(
NotificationCompat
.
PRIORITY_DEFAULT
);
}
}
...
...
app/src/main/java/app/insti/activity/MainActivity.java
View file @
57049bc9
...
@@ -241,10 +241,10 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -241,10 +241,10 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
mChannel
.
enableLights
(
true
);
mChannel
.
enableLights
(
true
);
// Sets the notification light color for notifications posted to this
// Sets the notification light color for notifications posted to this
// channel, if the device supports this feature.
// channel, if the device supports this feature.
mChannel
.
setLightColor
(
Color
.
RED
);
mChannel
.
setLightColor
(
Color
.
BLUE
);
mChannel
.
enableVibration
(
true
);
mChannel
.
enableVibration
(
true
);
mChannel
.
setVibrationPattern
(
new
long
[]{
100
,
200
,
300
,
400
,
500
,
400
,
300
,
200
,
4
00
});
mChannel
.
setVibrationPattern
(
new
long
[]{
0
,
2
00
});
mNotificationManager
.
createNotificationChannel
(
mChannel
);
mNotificationManager
.
createNotificationChannel
(
mChannel
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment