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"

Mobile Power/Lock screen button access

I've been looking through the documentation and support forums and I haven't been able to find anything on accessing the the power/lock screen buttons for Android/IOS? Is it possible to access these features on the phone through Blueprints or C++?

Product Version: UE 4.18
more ▼

asked Feb 27 '18 at 05:20 PM in Blueprint Scripting

avatar image

3 2 1 6

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

1 answer: sort voted first

As far as I know there are no callbacks for pressing power/lock/home button eighter for iOS and Android at all, even in native SDK (maybe in private section). You can only access the Back Button on Android (it is binded as Android Back event, check https://answers.unrealengine.com/questions/573388/how-to-exit-application-in-android-on-back-button.html )

The only thing you have in control and both OS support is the control over the lifecycle. Check the BlueprintPlatformLibrary.h file and bind into the BlueprintAssignables. You can also bind directly to the CoreDelegates.h in C++.

These delegates runs when the specific actions in the lifecycle occurs like - going to background, foreground, closing application etc.

When you press power/lock/screen button, the ApplicationWillDeactivateDelegate will launch.

more ▼

answered Feb 27 '18 at 07:05 PM

avatar image

755 24 48 145

avatar image Chasarsis Feb 28 '18 at 12:01 AM

Aw man, shoot. Thanks for the answer, that really helps me refocus my efforts to something else then

(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