Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25644] Check for physical/software buttons

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMarian Kucharcik
AssigneeUnknown
Created2017-12-11T09:29:32.000+0000
Updated2018-02-28T19:54:59.000+0000

Description

Hi guys, I think many of developers who uses newer phones has to check, if device has physical or software back button, menu button and home button. If they are software buttons, I have to calculate screen size - height of this buttons. It will be very nice to have property to check for this in native Titanium without Hyperloop. I check it like this:
var keyCharacterMap = require('android.view.KeyCharacterMap');
var keyEvent = require('android.view.KeyEvent');
var hasBackButton = keyCharacterMap.deviceHasKey(keyEvent.KEYCODE_BACK);
I tested with Nexus 5X (software buttons, hasBackButton = false) and Samsung Galaxy A5(physical buttons, hasBackButton = true). Thanks in advance for response

Comments

No comments

JSON Source