Closed ghost closed 5 years ago
Building with AndroidStudio gave a better hint @firescript:
Warning:The file: /home/mre/PROJECTS/test/node_modules/nativescript-contacts/platforms/android/AndroidManifest.xml is depricated, you can read more about what will be the expected plugin structure here: https://www.nativescript.org/blog/migrating-n-android-plugins-from-version-1.7-to-2.0
Hey @einicher , although CLI throws this warning, it is a false one, as it was decided to keep AndroidManifest for plugins. You can read more here.
Have you installed the plugin using tns install nativescript-contacts
? Also can you try to clean your android platforms and then building your project again:
tns platform clean android
tns deploy android
i did several times.
rm -rf node_modules platforms
tns platform add android
tns run android
same outcome, it shows me the contact selection dialog, but when i pick a contact i get the permission denied exception.
is it possible it has something to with
sudo npm install -g nativescript
npm install tns-core-modules@latest --save
i suddenly have to do this everytime i start a new project or else i get the error “app.js not found”
It's this android 6? On Jul 8, 2016 9:45 AM, "Markus René Einicher" notifications@github.com wrote:
i did several times.
rm -rf node_modules platforms tns platform add android tns run android
same outcome, it shows me the contact selection dialog, but when i pick a contact i get the permission denied exception.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/firescript/nativescript-contacts/issues/14#issuecomment-231363217, or mute the thread https://github.com/notifications/unsubscribe/ABeI6HrxMibBmEOZuo_tLTLwDxDiCck1ks5qTlSQgaJpZM4JH8xg .
@sitefinitysteve yes, android version 6.0.1
Can you try this? https://www.npmjs.com/package/nativescript-permissions On Jul 8, 2016 10:04 AM, "Markus René Einicher" notifications@github.com wrote:
@sitefinitysteve https://github.com/sitefinitysteve yes, android version 6.0.1
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/firescript/nativescript-contacts/issues/14#issuecomment-231367824, or mute the thread https://github.com/notifications/unsubscribe/ABeI6K1Oi7WKJbrIdcCbK5sIR4BNu0P6ks5qTljdgaJpZM4JH8xg .
@sitefinitysteve “Woo Hoo, I have the power” it works. Very important contribution, I would have nver thought about that, I thought it asks by itself, like qr-plugin does. thx!!
I'll see what i can do, or at least document it On Jul 8, 2016 10:23 AM, "Markus René Einicher" notifications@github.com wrote:
@sitefinitysteve https://github.com/sitefinitysteve “Woo Hoo, I have the power” it works. Very important contribution, I would have nver thought about that, I thought it asks by itself, like qr-plugin does. thx!!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/firescript/nativescript-contacts/issues/14#issuecomment-231372924, or mute the thread https://github.com/notifications/unsubscribe/ABeI6E6ASiJi-dkyKNOFO63r12WL27Efks5qTl1kgaJpZM4JH8xg .
You'll need a Runtime permission. with or without placing the permission in your manifest, You will need to request that permission from the User on-the-fly.
if( getApplicationContext().checkSelfPermission( Manifest.permission.READ_CONTACTS ) != PackageManager.PERMISSION_GRANTED ) ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.READ_CONTACTS}, resultValue);
only then after the approval you will be able to query the contacts phone number/name etc.
Docs have been updated to avoid this issue.
I still get this error. Can you please paste an working example to explain this?
Hi, on my android testphone - were it worked until now - i get this exception:
Permissions are not added to AndroidManifest.xml, if i add them by hand i still get the same error.
Also tried these suggstions: http://stackoverflow.com/questions/8104776/permission-read-contacts-does-not-seem-to-work - no success
Any hints?