[Solved] Flutter How to get WhatsApp profile picture on Android


Asked by genericUser on December 01, 2021 (source).

I'm developing an application, and I want to help my users with the registration process.

Users are creating profiles, so I want to automatically fetch their default WhatsApp profile picture from Media.

Is that possible? Looking for an Android solution.


Question answered by Maikzen (source).

You can access to files from whatsapp folder with:

Add this permission to AndroidManifest.xml

<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

Request permission as shown below

await Permission.manageExternalStorage.request();

Then you can read any file and write to any location in Android (for example: storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media). But the problem with that is you won't be allow to upload apps in google play store using that permission.