Comments (6)
Hey @SamarRizvi,
Sorry for the response time. It looks like the plugin is not imported correctly. I never used the Intel XDK. Have you read https://software.intel.com/en-us/xdk/docs/adding-third-party-plugins-to-your-xdk-cordova-app
from cordova-plugin-contacts-phone-numbers.
Hi @dbaq ,
I have imported other plugins that are on github, they work fine. Do not understand, why your plugin doesn't work, even when Intel XDK shows your plugin as installed after build.
from cordova-plugin-contacts-phone-numbers.
Can you share some code? Which platform are you using?
from cordova-plugin-contacts-phone-numbers.
Sorry for replying late. I am using Intel XDK for developing html5+cordova project. About sharing code, you first have to download Intel XDK, and then create a new html5+cordova project or use a sample html5+cordova project that they have. Then include your plugin as third party plugin in your project ( read "Including Third Party Plugin" section at https://software.intel.com/en-us/xdk/docs/adding-third-party-plugins-to-your-xdk-cordova-app). Then use your example code after deviceReady. You have to build the project for a third party plugin to work and deploy the apk on your mobile phone to check if it's working. I have already repeated the above steps over and over again, but no use. Note that the cordova CLI version that I have set in Intel XDK is 4.1.2. All third party plugins work fine on mobile, but navigator.contactsPhoneNumbers always comes undefined.
from cordova-plugin-contacts-phone-numbers.
hey @SamarRizvi,
It is working for me when I test on my android device. You have to use the APK coming from the build, do not use their App preview:
Here is my onDeviceReady
function that I used in main.js:
var onDeviceReady=function(){
alert(device.model);
navigator.contactsPhoneNumbers.list(function(contacts) {
alert(contacts.length + ' contacts found');
}, function(error) {
alert(error);
});
if( window.Cordova && navigator.splashscreen ) { // Cordova API detected
navigator.splashscreen.hide() ; // hide splash screen
}
};
also in index.html, make sure to have the cordova.js imported before main.js:
<script type="text/javascript" src="cordova.js"></script>
<script src="js/main.js" type="text/javascript"></script>
I am closing this issue since it is not related to this plugin. Do not hesitate to contact the XDK team if you can't figure it out what is going on.
from cordova-plugin-contacts-phone-numbers.
I am also getting navigator.contactsPhoneNumbers as undefined, I get "Cannot read property 'list' of undefined"
I am using phonegap and running inside of intelliJ using "serve android"
from cordova-plugin-contacts-phone-numbers.
Related Issues (20)
- How to use this plugin in iOnic2 ? HOT 2
- PLUGIN NOT WORKING HOT 10
- Sorting Contacts HOT 1
- got error with last version of cordova-plugin-contacts HOT 2
- install error HOT 8
- cordova plugin add cordova-plugin-contacts-phonenumbers
- fix for installation issue not released HOT 1
- App crashes when method is called — iOS 11.3 HOT 10
- Package dependencies issue HOT 1
- Ionic 3 HOT 1
- Benchmark was performed with hasPhoneNumber? HOT 1
- unable to fetch this plugin during installation HOT 3
- App Crash: Android 5.1 HOT 2
- null pointer exception HOT 1
- How to import Navigator from this library in typescript? HOT 1
- IOS: Is NSContactsUsageDescription requirement applicable to this plugin? HOT 3
- Missing Contacts HOT 2
- Capacitor support HOT 1
- this plugin is not working for android 11 devices
- cordova.file.externalRootDirectory not working in Android 11 devices
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 cordova-plugin-contacts-phone-numbers.