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

Database contacts getting error #2

Closed mudassirzulfiqar closed 7 years ago

mudassirzulfiqar commented 7 years ago

Hi My phone is rooted. Im just testing this project. I got an error at this line

                                 db = SQLiteDatabase.openOrCreateDatabase(new File("/data/data/com.whatsapp/databases/wa.db"), null);

while getting contacts. Can you please elaborate this error. Also I havnt found any directory named wa.db in my phone. ??

rodrigoxcruz commented 7 years ago

The same problem happened to me. Any solution?

mudassirzulfiqar commented 7 years ago

Im trying to figure this out.. I think developer should address this issue

muhammadkamranlatifraza commented 7 years ago

I have tried to getContacts(); this is showing me

                                                                  Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14): , while compiling: PRAGMA journal_mode
omegaes commented 7 years ago

Hi, I published new update, it gonna save the problem, give it a try

TazmanOne commented 7 years ago

If you had problem you need add permission on main folder Shell.SU.run("chmod 777 /data/data/com.whatsapp");