Comments (6)
This permission may be blocked by system.
You can check your app's permissions in Setting. Follow this at Turn permissions on or off
.
Also, I'll consider to check the permission at runtime in the next version.
from react-native-system-setting.
my build.gradle:
`
compileSdkVersion 24
buildToolsVersion "24.0.3"
dexOptions {
jumboMode = true
}
defaultConfig {
applicationId "com.huabenapp"
minSdkVersion 16
targetSdkVersion 24
`
sorry 我要说中文了...
当 build.gradle 内的 compileSdkVersion 为 24的时候,会有问题, 您的例子里的是22, 24的话,改变了授权方式 ...
最后: 大概什么时候会出 下个版本呢? 坐等哈
感谢作者无私的奉献 ...
from react-native-system-setting.
代码已经提交,但目前手上没有Android 6+手机,明天找机器测试下再发布新版本
from react-native-system-setting.
V 1.1.0 has published
API change:
setScreenMode(val)
, setBrightness(val)
or setBrightnessForce(val)
will return a promise
add a new API grantWriteSettingPremission()
All changes are forward compatible
usage
const result = await SystemSetting.setBrightnessForce(value)
!result && Alert.alert('Permission Deny', 'You have no permission changing settings',[
{'text': 'Ok', style: 'cancel'},
{'text': 'Open Setting', onPress:()=>SystemSetting.grantWriteSettingPremission()}
])
from react-native-system-setting.
@c19354837 thanks a lot !
感谢! 么么哒!!!
from react-native-system-setting.
V1.1.1 is available.
new APIs for Android brightness: setAppBrightness(val)
getAppBrightness()
. You can change app's brightness without any permission. see CHANGELOG
from react-native-system-setting.
Related Issues (20)
- addVolumeListener is not triggered on iOS 15 beta HOT 33
- grantWriteSettingPermission is not showing in my project even i install latest
- ios: Prevent volume slider overlay to display HOT 5
- `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. HOT 3
- calling startActivity() from outside of an Activity context issue HOT 3
- setAppBrightness back to system brightness HOT 1
- Unable to pause activity {***.MainActivity}: java.lang.IllegalArgumentException: Receiver not registered: com.ninty.system.setting.SystemSetting$VolumeBroadcastReceiver@d40d302 HOT 2
- Spotify music stops when open the app HOT 1
- wifi listener and airplane mode listener for ios
- Invariant Violations on iOS ("`new NativeEventEmitter()` requires a non-null argument", and "Module AppRegistry is not a registered callable module") HOT 2
- new NativeEventEmitter() was called with a non-null argument without the required addListener method Android HOT 2
- How to enable PRIVATE_API on newer react native version?
- App crashes on Samsung s10 if holding (changing) volume during start up
- setAppBrightness is not working in android Nokia phone
- volume up and Volume down listner not working on ios 15 and above version. is there any solution for this? HOT 4
- Event Listeners are not working. Callback functions are not executing and returning anything. [ios] HOT 1
- (iOS) Airplane mode not works with eSIM
- Is there an actively maintained fork we can use?
- Patch file for PR's 84 - 156
- Missing permissions required by BluetoothAdapter.disable: android.permission.BLUETOOTH_CONNECT [MissingPermission]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-system-setting.