playMaker

Author Topic: Handy Android tip - using the device back button  (Read 8895 times)

Groo Gadgets

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Handy Android tip - using the device back button
« on: August 23, 2012, 07:48:12 PM »
Hey guys,

I just recently picked up a Nexus 7 for mobile development and was curious if it were possible to utilize the persistent "back button" on the device using PlayMaker.

I found out that Unity maps the Escape key to the back button on Android devices. So if you want to access the back button in your Android app all you have to do is use the "Get Key Down" action and point it to the Escape key.

http://answers.unity3d.com/questions/25535/android-back-button-event.html

Nice to know that we don't require a custom action to get this working  :-)

Cheers,

Simon

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • View Profile
    • Permaximum Betty
Re: Handy Android tip - using the device back button
« Reply #1 on: August 25, 2012, 10:45:15 AM »
I can confirm this works on Samsung Galaxy S/S3 to.

smiffy

  • Junior Playmaker
  • **
  • Posts: 54
    • View Profile
Re: Handy Android tip - using the device back button
« Reply #2 on: August 29, 2012, 08:57:05 AM »
Check the following out too, it covers resuming from an interrupt, ie when a phone call stops the game.

http://hutonggames.com/playmakerforum/index.php?topic=1591.0

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Handy Android tip - using the device back button
« Reply #3 on: February 16, 2015, 11:28:48 PM »
First I thought it does not work on Samsung Galaxy 4S mini but than it worked, built onto device.

It just does not work when testing in Unity Remote.

Br,
szomaza
« Last Edit: February 17, 2015, 12:25:24 AM by szomaza »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4710
    • View Profile
    • jinxtergames
Re: Handy Android tip - using the device back button
« Reply #4 on: April 23, 2015, 08:01:12 PM »
i does not work on unity remote, but you can just press the escape key to have the same effect

Greetings,

Dino