Launch a project on Button click
- 11 Jul 2023
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Launch a project on Button click
- Updated On 11 Jul 2023
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Article Summary
Share feedback
Thanks for sharing 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?