Android Helpers (ssk.android.*)

This library contains a few helper functions to handle common Android issues/tasks.

captureBackButton captureVolumeButtons easyAndroidUIVisibility

captureBackButton

Capture the back button on Android devices and prompt the user to be sure they really want to leave the app.

When user presses back button they are prompted with a pop-up dialog:

captureBackButton

ssk.android.captureBackButton( [ noCB, [ yesCB ] ] )

local onNo()
   print("Pressed No")   
end

local onYes()
   print("Pressed Yes")
end

ssk.android.captureBackButton( onNo, onYes )

captureVolumeButtons

Capture the volume buttons on Android and do something when they are pressed.

ssk.android.captureVolumeButtons( [ block, [ volUp, [ volDown ] ] ] )

local upUp()
   print("Use tried to increase volume")   
end

local onDown()
   print("Use tried to decrease volume")   
end

ssk.android.captureBackButton( true, onUp, onDown )

easyAndroidUIVisibility

Easily hide Android virtual buttons (back, home, ... ).

ssk.android.easyAndroidUIVisibility( [ profile ] ] )

-- Automatically use 'immersiveSticky' if available.
ssk.android.easyAndroidUIVisibility( nil )


RoamingGamer Copyright © Roaming Gamer, LLC. 2008-2016; All Rights Reserved