File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
android/src/main/java/com/levelasquez/androidopensettings Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -121,4 +121,7 @@ AndroidOpenSettings.deviceInfoSettings()
121
121
122
122
// Open application notification settings menu
123
123
AndroidOpenSettings.appNotificationSettings()
124
+
125
+ // Open sound settings menu
126
+ AndroidOpenSettings.soundSettings()
124
127
```
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public void generalSettings() {
32
32
reactContext .startActivity (intent );
33
33
}
34
34
}
35
-
35
+
36
36
@ ReactMethod
37
37
public void homeSettings () {
38
38
Intent intent = new Intent (Settings .ACTION_HOME_SETTINGS );
@@ -231,4 +231,14 @@ public void appNotificationSettings() {
231
231
reactContext .startActivity (intent );
232
232
}
233
233
}
234
+
235
+ @ ReactMethod
236
+ public void soundSettings () {
237
+ Intent intent = new Intent (Settings .ACTION_SOUND_SETTINGS );
238
+ intent .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
239
+ intent .addFlags (Intent .FLAG_ACTIVITY_NO_HISTORY );
240
+ if (intent .resolveActivity (reactContext .getPackageManager ()) != null ) {
241
+ reactContext .startActivity (intent );
242
+ }
243
+ }
234
244
}
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ declare module "react-native-android-open-settings" {
19
19
const applicationSettings : ( ) => void ;
20
20
const deviceInfoSettings : ( ) => void ;
21
21
const appNotificationSettings : ( ) => void ;
22
+ const soundSettings : ( ) => void ;
22
23
}
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ const deviceInfoSettings = () => RNAndroidOpenSettings.deviceInfoSettings()
42
42
43
43
const appNotificationSettings = ( ) => RNAndroidOpenSettings . appNotificationSettings ( )
44
44
45
+ const soundSettings = ( ) => RNAndroidOpenSettings . soundSettings ( )
46
+
45
47
module . exports = {
46
48
generalSettings,
47
49
homeSettings,
@@ -63,4 +65,5 @@ module.exports = {
63
65
applicationSettings,
64
66
deviceInfoSettings,
65
67
appNotificationSettings,
68
+ soundSettings
66
69
}
You can’t perform that action at this time.
0 commit comments