Can I add a button in the screen to call a method or activity? Thanks.
W
Wolfgang Damm
said
over 10 years ago
yes you can.
simply add a <div> or <button> element on your HTML, it will be displayed on screen on top of everything else. Adding the onClick allows you to call a javascript function, which could interface with your native code to open the activity.
e.g
function buttonClicked() {
document.location = "architectsdk://dosomething";
}
...
<div onClick="buttonClicked();">Click here</div>
Inside your native code you must react on the "architectsdk://" url being called. See ArchitectUrlListener for more details on how to do this.
Lucas
1 person has this problem