Open sido420 opened 4 years ago
I have the following permissions added to AndroidManifest.xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
@sido420 you are using n7 version with N 6.x (share your package.json next time, easier to see all).
Either use nativescript-perms
with N 6.x
or @nativesciprt-community/perms
with N 7.x
Same error even with nativescript-perms
import { getTypes, request, RequestOptions, Rationale, check, Permissions } from 'nativescript-perms';
Here is package.json:
"nativescript": {
"id": "com.example",
"tns-ios": {
"version": "6.5.0"
},
"tns-android": {
"version": "6.5.0"
}
},
"dependencies": {
"@nativescript/core": "6.5.0",
"@nativescript/theme": "^2.3.3",
"@nstudio/nativescript-loading-indicator": "^4.0.0",
"localforage": "^1.9.0",
"localforage-memoryStorageDriver": "^0.9.2",
"nativescript-accelerometer": "3.0.0",
"nativescript-background-http": "4.2.1",
"nativescript-camera": "4.5.0",
"nativescript-contacts": "^1.6.2",
"nativescript-feedback": "^1.5.0",
"nativescript-geolocation": "5.1.0",
"nativescript-https": "^2.1.0",
"nativescript-image": "3.0.1",
"nativescript-imagepicker": "7.1.0",
"nativescript-intl": "3.0.0",
"nativescript-iqkeyboardmanager": "1.5.1",
"nativescript-oauth2": "^2.4.2",
"nativescript-perms": "^2.0.11",
"nativescript-secure-storage": "^2.6.1",
"nativescript-social-share": "1.6.0",
"nativescript-theme-core": "1.0.6",
"nativescript-toast": "^2.0.0",
"nativescript-ui-autocomplete": "6.0.1",
"nativescript-ui-calendar": "6.1.0",
"nativescript-ui-chart": "7.1.1",
"nativescript-ui-dataform": "6.0.0",
"nativescript-ui-gauge": "6.0.0",
"nativescript-ui-listview": "8.0.1",
"nativescript-ui-sidedrawer": "8.0.0",
"nativescript-urlhandler": "^1.3.0",
"nativescript-vibrate": "^3.1.0",
"nativescript-vue": "2.5.0",
"svelte-native": "0.8.1",
"tns-core-modules": "6.5.0"
},
"devDependencies": {
"nativescript-dev-webpack": "1.5.1",
"node-sass": "~4.12.0",
"svelte": "3.20.1",
"svelte-loader": "github:rixo/svelte-loader#2204a8f7e66e441f5e0ce6e70a5fa0f9e6bb2103",
"svelte-native-preprocessor": "^0.1.4",
"tns-platform-declarations": "^6.5.15",
"typescript": "3.5.3"
}
I use:
npx tns platform clean android
npx tns build android
npx tns debug android
Can you share the full error stack?
Sorry for the late response.
I tried many things, but couldn't get NS to print a meaningful stack trace.
All of the following just give me the error in title:
If you know of anything else that I can try, I'd be happy to do so. Other than that, plz let me know if theres any other way I could help you debug.
It gave you the error but with more Please copy your full console log from when you get that error
I did not find sample usage details in demo app.
There is no existing issue related to this.
Android (not tested on iOS)
Android 8.1.0
ASUS Zenphone
CLI: 6.7.8
Cross-platform modules: "6.5.0"
Runtime(s): 6.5.0 (both)
Plugin(s): let me know if needed
Here is code example:
getPermissionTypes works fine but requestContactsPermission throws the error in title in the calling function.