Launch a project on Button click
- 11 Jun 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Launch a project on Button click
- Updated On 11 Jun 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
If you want to launch a project on the click of a button in your app, call embedProject
with the Project ID when the button is clicked.
Android
Button yourButton = dialog.findViewById(R.id.your_button_id);
yourButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Leap.embedProject("PROJECT_ID");
}
});
iOS
import LeapSDK
@IBAction func onButtonClick(_ sender:UIButton) {
Leap.shared.embedProject("<PROJECT_ID>")
}
Was this article helpful?