Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Ask for android storage permissions

How I can ask for android permissions at runtime or starting my game? I really need it for the save system, but the 'Use externaldir' option (For save the game without the need of permissions, but when the game uninstalls the save get erased) don't work for me.

When I package my project for development, the game automatically asks for permissions before starts.

When I package my project for shipping, the game doesn't asks anything. This is a problem because I need to warn to make users to go to the app settings, permissions and manually enable them. And I can't translate that warning to every language in the world. This would kill my Google Play app ratings.

alt text

As you can see, I have a node in begin play, that check for android permissions. If the permissions are enabled, it prints 'worked' (Only in debug, obviously). If the permissions aren't enabled, they create a warning widget.

When I go to test the game to my phone with a shipping build, THIS WORKS!!! When I open the game without storage permissions, it creates the widget. Otherwise, it doesn't create anything.

The problem comes when the 'Request for permissions' blueprint doesn't ask for permissions: alt text

My issue is using Request Android Permissions node. If I put another node that converts an string to array, the game crashes, so this node+'Get Character Array from String' is 'valid'. There isn't any documentation online of how to use the Check and Request Android Permissions (Android Runtime Permissions plugin).

Please, help. Is one of the last things that I need to finish my first game in UE4. I don't want to finish a game that needs savedata without access to savedata.

Any other way to request android permissions? Any way to correctly use that node?

Product Version: UE 4.19
screenshot-3.png (147.2 kB)
screenshot-4.png (78.8 kB)
more ▼

asked Aug 25 '18 at 10:59 PM in Blueprint Scripting

avatar image

28 4 7 14

avatar image Omar Vector Nov 08 '18 at 10:31 PM

Request permission accept array of strings where each index has one string of permission, what you did is you converting your single string to array of char which will not make any sense

avatar image DesignerJoon Feb 24 '19 at 02:52 AM

I have same issue on my project. The development build asks user permission for writing storage and save game feature works fine, but the shipping build doesn't. Anyone who knows the reason and the solution?

(I checked AndroidManifest.xml in the Intermediate folder and there is the tag:

uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/

I also added "android.permission.WRITE_EXTERNAL_STORAGE" on the Extra Permission section in the Project Setting. But the issue was not solved.)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I do this. Works for me in Store.alt text

Also difference between Shipping and Debug\Development may be in manifest. You may need to add your desired permissions to the manifest of your app. You may not ask for permissions which is not in the manifest as i can remember. Not sure.

idodis.png (260.0 kB)
more ▼

answered Aug 26 '18 at 02:26 PM

avatar image

198 6 9 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question