How to use status folder for WhatsApp status saver app in android 11 scoped storage

0 votes
Hello, I've created a WhatsApp status-saver app. I am unable to access the user's state in the app due to Google's introduction of scoped storage in Android 11. To accomplish this, I utilized MANAGE EXTERNAL STORAGE, but I am unable to publish the app to Google Play using this. I've observed a couple of apps requesting access to the .status folder using some sort of permission. What steps should I take to do that?
Nov 7 in Android by Edureka
• 10,880 points
49 views

1 answer to this question.

0 votes

Request the user to give permission to the WhatsApp status storage folder.

private void checkWhatsAppPermission(){
    // Choose a directory using the system's file picker.
    Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
    // Optionally, specify a URI for the directory that should be opened in
    // the system file picker when it loads.

    Uri wa_status_uri = Uri.parse("content://com.android.externalstorage.documents/tree/primary%3AAndroid%2Fmedia/document/primary%3AAndroid%2Fmedia%2Fcom.whatsapp%2FWhatsApp%2FMedia%2F.Statuses");
    intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, wa_status_uri);
    startActivityForResult(intent, 10001);
}
answered Nov 8 by Edureka
• 12,290 points

Related Questions In Android

0 votes
0 answers

How to open WhatsApp using an Intent in your Android App?

I want an Intent to take control ...READ MORE

3 days ago in Android by Ashwini
• 2,760 points
10 views
0 votes
1 answer

Android in-app billing - How to handle refunds ?

Simply disregard the library's purchase to overcome ...READ MORE

answered Nov 10 in Android by Edureka
• 10,880 points
44 views
0 votes
0 answers

How to implement the system lock screen in your own android app?

How should the system lock screen be ...READ MORE

4 days ago in Android by Edureka
• 10,880 points
5 views
0 votes
0 answers

How to launch Amazon Shopping app in Android app?

I want my Android application to be ...READ MORE

3 days ago in Android by Ashwini
• 2,760 points
7 views
0 votes
1 answer
0 votes
0 answers
0 votes
1 answer

"Default Activity Not Found" on Android Studio upgrade

If you see that ERROR occurrence after ...READ MORE

answered Feb 11 in Others by Soham
• 9,670 points
355 views
0 votes
1 answer
0 votes
1 answer

How get permission for camera in android.(Specifically Marshmallow)?

To begin with, confirm that the user ...READ MORE

answered Nov 8 in Android by Edureka
• 12,290 points
27 views
0 votes
1 answer

How to set my Activity as main activity in android?

The "intent-filter" in "AndroidManifest.xml" allows you to ...READ MORE

answered Nov 8 in Android by Edureka
• 12,290 points
32 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP