omegaes / Whatsapp-API

An Android Library with demo application, to send media and text messages via Whatsapp on rooted device
http://abdul.mega4tech.com/
GNU Lesser General Public License v3.0
153 stars 78 forks source link

Is posible check if a number phone have whatsapp? #1

Closed webserveis closed 7 years ago

webserveis commented 7 years ago

Recently whatsapp add feature in link, start chat without add contact in contacts database, using direct link

https://api.whatsapp.com/send?phone=XXXXXXXX

is posible check if the phone have a whatsapp?

omegaes commented 7 years ago

I don't think it is possible, this link need authentication

nian88 commented 7 years ago

@omegaes when I try this library why the error to open the wa database

omegaes commented 7 years ago

@nian88 can you attach your logcat history ? wa database contains your whatsapp contacts

nian88 commented 7 years ago

this my logcat history

image

omegaes commented 7 years ago

@nian88 Are you sure your device is rooted and grant your application root privileges and have Whatsaap application, not whatsapp plus or whatever ?!?

nian88 commented 7 years ago

yes my device is rooted..I try on a different device but experiencing the same problem

this my project https://github.com/nian88/wanian

JavierSolis commented 7 years ago

I had the same problem, check your builder, and add this line

Shell.SU.run("chmod 777 /data/data/com.whatsapp/databases/wa.db"); And solved. I hope it helps you.

omegaes commented 7 years ago

@JavierSolis you are right, I will use

Shell.SU.run("chmod -R 777 /data/data/com.whatsapp"); this one will solve all issues

JavierSolis commented 7 years ago

@webserveis to check if the number has whastapp, you could add it to your contacts, after a moment and if there is internet, check the list of users

WhatsappApi.getInstance().getContacts(Context, GetContactsListener)

nian88 commented 7 years ago

@JavierSolis @omegaes awesome.. thanks.. solved