Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
disroot
disapp
Commits
2251d58e
Commit
2251d58e
authored
May 17, 2019
by
Massimiliano
Browse files
Added Disroot purple light notification
parent
6a0285df
Changes
3
Hide whitespace changes
Inline
Side-by-side
.idea/caches/build_file_checksums.ser
View file @
2251d58e
No preview for this file type
app/src/main/java/org/disroot/disrootapp/ui/MainActivity.java
View file @
2251d58e
...
...
@@ -1913,7 +1913,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
checkDate
.
edit
().
putString
(
"storeDate"
,
stateDate
).
apply
();
//return null;
}
else
if
(!
stateDate
.
equals
(
dateStored
)&&
!
stateDate
.
equals
(
""
))
//dateStored
else
if
(!
stateDate
.
equals
(
"2"
)&&
!
stateDate
.
equals
(
""
))
//dateStored
{
checkDate
.
edit
().
putString
(
"storeDate"
,
stateDate
).
apply
();
Log
.
e
(
TAG
,
"date: "
+
dateStored
);
...
...
@@ -1946,7 +1946,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
//Notification
private
void
sendNotification
()
throws
JSONException
{
String
CHANNEL_ID
=
"316865431"
;
String
CHANNEL_ID
=
"316865431
2
"
;
String
CHANNEL_NAME
=
"StateNotification"
;
HttpHandler
sh
=
new
HttpHandler
();
String
jsonStrincidents0
=
sh
.
makeServiceCall
(
incidenturl0
);
...
...
@@ -1972,7 +1972,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
// I would suggest that you use IMPORTANCE_DEFAULT instead of IMPORTANCE_HIGH
NotificationChannel
channel
=
new
NotificationChannel
(
CHANNEL_ID
,
CHANNEL_NAME
,
NotificationManager
.
IMPORTANCE_HIGH
);
channel
.
enableVibration
(
true
);
channel
.
setLightColor
(
Color
.
MAGENTA
);
channel
.
setLightColor
(
Color
.
rgb
(
80
,
22
,
45
)
);
channel
.
enableLights
(
true
);
channel
.
setVibrationPattern
(
new
long
[]{
50
,
500
,
100
,
300
,
50
,
300
});
notificationManager
.
createNotificationChannel
(
channel
);
...
...
@@ -1989,7 +1989,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
Uri
alarmSound
=
RingtoneManager
.
getDefaultUri
(
RingtoneManager
.
TYPE_NOTIFICATION
);
notificationBuilder
.
setSound
(
alarmSound
)
.
setVibrate
(
new
long
[]{
50
,
500
,
100
,
300
,
50
,
300
})
.
setLights
(
Color
.
MAGENTA
,
3000
,
3000
);
.
setLights
(
Color
.
BLUE
,
3000
,
3000
);
NotificationManager
mNotificationManager
=
(
NotificationManager
)
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
){
...
...
app/src/main/res/xml/changelog_master.xml
View file @
2251d58e
...
...
@@ -2,6 +2,7 @@
<changelog>
<release
version=
"1.1.5"
versioncode=
"18"
>
<change>
Notifications works on Android 8 and higher now
</change>
<change>
Added Disroot purple light notification
</change>
<change>
Updated Serbian translation
</change>
</release>
<release
version=
"1.1.4"
versioncode=
"17"
>
...
...
Write
Preview
Supports
Markdown
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