You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the app is requesting permissions but is unable to get them due to being above API Level 23 and needing the user to request them. After altering my app to request settings permissions, I am still getting the same error as above. I have added the code below from m yapp.component.ts and my main-activity.ts where I request settings permissions.
Which platform(s) does your issue occur on?
Android
API Level 26
emulator & device (HUAWEI MediaPad T3)
Please, provide the following version numbers that your issue occurs with:
CLI: 4.2.3
Cross-platform modules: 4.2.1
Runtime(s): 4.2.0
Plugin(s): (look for the version numbers in the package.json file of your
project and paste your dependencies and devDependencies here)
Please, tell us how to recreate the issue in as much detail as possible.
// main-activity.ts/** Called when the activity is first created. */publiconCreate(savedInstanceState: android.os.Bundle): void{if(!this._callbacks){setActivityCallbacks(this);}// Check whether has the write settings permission or not.letsettingsCanWrite: boolean=android.provider.Settings.System.canWrite(this);if(!settingsCanWrite){constintent=newandroid.content.Intent(android.provider.Settings.ACTION_MANAGE_WRITE_SETTINGS);// If do not have write settings permission then open the Can modify system settings panel.this.startActivity(intent);}}
The text was updated successfully, but these errors were encountered:
Hi @DeadEnglish,
Could you try the demo project to check whether the error appears? We have tested with API Level 26 and 28 and it works as expected. You are not required to request settings permissions as it is done internally by the plugin. What you need to do is add <uses-permission android:name="android.permission.WRITE_SETTINGS"/> in your AndroidManifest.xml
When using
nativescript-brightness
within my app. I am receiving the following java runtime error.It seems like the app is requesting permissions but is unable to get them due to being above API Level 23 and needing the user to request them. After altering my app to request settings permissions, I am still getting the same error as above. I have added the code below from m y
app.component.ts
and mymain-activity.ts
where I request settings permissions.Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
package.json
file of yourproject and paste your dependencies and devDependencies here)
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
Is there any code involved?
The text was updated successfully, but these errors were encountered: