Code Monkey home page Code Monkey logo

flutter_whatsapp's Issues

Check Contacts permission on runtime

Current behavior

When go to chat/new route, the app will crash and you'll get this error if Contacts permission is not granted:

E/AndroidRuntime(18850): FATAL EXCEPTION: pool-1-thread-1
E/AndroidRuntime(18850): Process: com.hanmajid.flutterwhatsapp, PID: 18850
E/AndroidRuntime(18850): java.lang.RuntimeException: An error occurred while executing doInBackground()
E/AndroidRuntime(18850): 	at android.os.AsyncTask$4.done(AsyncTask.java:399)
E/AndroidRuntime(18850): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
E/AndroidRuntime(18850): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
E/AndroidRuntime(18850): 	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
E/AndroidRuntime(18850): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(18850): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(18850): 	at java.lang.Thread.run(Thread.java:919)
E/AndroidRuntime(18850): Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{f066ef9 18850:com.hanmajid.flutterwhatsapp/u0a205} (pid=18850, uid=10205) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
E/AndroidRuntime(18850): 	at android.os.Parcel.createException(Parcel.java:2071)
E/AndroidRuntime(18850): 	at android.os.Parcel.readException(Parcel.java:2039)
E/AndroidRuntime(18850): 	at android.os.Parcel.readException(Parcel.java:1987)
E/AndroidRuntime(18850): 	at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5056)
E/AndroidRuntime(18850): 	at android.app.ActivityThread.acquireProvider(ActivityThread.java:6561)
E/AndroidRuntime(18850): 	at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2725)
E/AndroidRuntime(18850): 	at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:2117)
E/AndroidRuntime(18850): 	at android.content.ContentResolver.query(ContentResolver.java:928)
E/AndroidRuntime(18850): 	at android.content.ContentResolver.query(ContentResolver.java:880)
E/AndroidRuntime(18850): 	at android.content.ContentResolver.query(ContentResolver.java:836)
E/AndroidRuntime(18850): 	at flutter.plugins.contactsservice.contactsservice.ContactsServicePlugin.getCursor(ContactsServicePlugin.java:229)
E/AndroidRuntime(18850): 	at flutter.plugins.contactsservice.contactsservice.ContactsServicePlugin.access$200(ContactsServicePlugin.java:44)
E/AndroidRuntime(18850): 	at flutter.plugins.contactsservice.contactsservice.ContactsServicePlugin$GetContactsTask.doInBackground(ContactsServicePlugin.java:170)
E/AndroidRuntime(18850): 	at flutter.plugins.contactsservice.contactsservice.ContactsServicePlugin$GetContactsTask.doInBackground(ContactsServicePlugin.java:149)
E/AndroidRuntime(18850): 	at android.os.AsyncTask$3.call(AsyncTask.java:378)
E/AndroidRuntime(18850): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(18850): 	... 3 more

Expected behavior

Check Contacts permission on runtime.

Migrate to AndroidX

Current behavior:

When running, you get this message:

[!] Your app isn't using AndroidX.
    To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.

Expected behavior:

The message is no longer displayed when running.

Migrate backend to Firebase

Current behavior

Backend is personal dummy server.

Expected behavior

Migrate backend to Firebase (Firestore).

Camera features don't work

Environment

Flutter 1.17

Current Behavior

When opening the camera page, these issues occur:

  • There's no error stack on my debug console.
  • The camera opens up properly but the gallery image doesn't show any recent image.
  • The take picture/Video button doesn't work.
  • It doesn't find the device path.

Expected Behavior

  • The mentioned issues don't happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.