Warning message Google Play "RequestLegacyExternalStorage tag in the manifest"

Hey, guys (in particular @orangegstudios and @aclementerodrguez). I am so sorry… I ran into a problem trying to reproduce your issue. I tried to reuse your code, but everything seems to be working fine for me :frowning:

  1. Where do you get this message?
  2. What version of android are you running?
  3. Can you make a small example for me to work with? Please, try building my example and see if it works for you.

Here is my code:

local json = require "json"
math.randomseed( os.time() )
display.newText( "TEST SOCIAL", display.contentCenterX, 30, nil, 15 ):addEventListener( "tap", function (  )
    local group = display.newGroup()
    display.newRect(group, math.random(50), math.random(50), math.random(150), math.random(150) ):setFillColor(math.random(),math.random(),math.random())
    display.newCircle(group, math.random(200), math.random(200), math.random(50) ):setFillColor(math.random(),math.random(),math.random())
    display.newRect(group, math.random(50), math.random(50), math.random(150), math.random(150) ):setFillColor(math.random(),math.random(),math.random())
    display.newCircle(group, math.random(200), math.random(200), math.random(50) ):setFillColor(math.random(),math.random(),math.random())
    display.newRect(group, math.random(50), math.random(50), math.random(150), math.random(150) ):setFillColor(math.random(),math.random(),math.random())
    display.newCircle(group, math.random(200), math.random(200), math.random(50) ):setFillColor(math.random(),math.random(),math.random())
    group:translate(group.width/2, group.height/2+20)

    display.save( group, { filename="g.png", baseDir=system.TemporaryDirectory} )
    
    function listener(event)
        print("POPUP EVENT!", json.prettify( event ))
    end
    local options = {service = "share", 
                        message = "This drawing I did with 'Princess Coloring Book & Games'", 
                        listener = listener,
                        image = {{filename = "g.png", baseDir = system.TemporaryDirectory}},
                        url = {"https://play.google.com/store/apps/details?id=123"}}
                                    
    native.showPopup("social", options)

end)

I’d like to hope so. But the message from the Play Console said:“We found that in the manifest file of one or more sets of App Bundle or APK files of your application there is a mark requestLegacyExternalStorage…”. Although I checked: it says on my device that the application did not request any permissions (and they can not be, I wrote the code myself). What do you think about this?

In previous builds “requestLegacyExternalStorage” was set to true. Vlad did remove this flag, so it will not state it is using legacy external storage. All builds with the latest SDK will not show this message anymore.

So, I need to rebuild the app, and make a new release in the Play Console?

Hi @vlads, I compiled your code and it shows me the message “THIS FILE FORMAT IS NOT COMPATIBLE”.
The message appears after selecting the service with which to share the image, for example WhatsApp

I am testing with Android 11

Hi @vlads, I do not compile your code yet, but I have noted that the image you share have the png extension and mine is jpeg. But I think that does not determine because the code of @orangegstudios also has the image in png format. I’m testing in Android 10.

I am 99% sure that the problem is not in my code because as with @orangegstudios my app worked perfectly in the previous versions. Anyway I will keep checking.

I have verified that it was in the truth. I just made a compilation of my app with the previous version of Solar2D (3642) and my app works perfectly.
As an additional data that may differ with your test code, my app uses the permission WRITE_EXTERNAL_STORAGE to be able to save the image into the gallery.
I’m pretty sure @orangegstudios also uses this permission.

Could you take a screenshot of the message? Does logcat show anything? I can not reproduce it :frowning:
When exactly it happens? Which app shows the error?

Hi @aclementerodrguez, in my case i dont use permission WRITE_EXTERNAL_STORAGE as i save image in system.TemporaryDirectory

@vlads , as I mentioned in a previous message, the message appears after selecting the service, for example WhatsApp, and after choosing the contact.

If I choose email, it opens the gmail window for example and attaches an invalid image.

Example with WhatsApp:

Example with Gmail:

but mydraw.png is invalid when you try to open it

Ok, thank your for the info!

Basically it happen the same way for me, so the @orangegstudios testing is enough.

Ah! Finally I found what was the issue… somehow I was testing old code :frowning:
Here is ‘amazing’ fix, and build 3644 should be up in about a hour

Great! glad to hear that!

@orangegstudios @aclementerodrguez new build 3644 is up. Please test.

@vlads, I just compiled with build 3644 and now it works perfect! :clap: :clap: :clap:

So when we get this message we have to upload a new build? When we use external_storage to save data?
Is it enough to update, or are there additional steps to follow?

I made an update from the last build and released it. And how do I know now that everything is fine, and Google likes everything?
Or will I find out on May 5?

1 Like

In the Google Play Developer Console, go to the dashboard of your app. Go to the last menu item on the left side: “Guidelines - App-Contents” (or something similar, my dashboard is in german language). If there is no warning there, everything should be alright.

You can read this on this site: