openURL( )


Directs the mobile app to open the specified URL in the device's browser.

developer preview tag

The openURL() function returns a Promise that resolves when the navigation is successful.

Supported URL formats:

  • An external web address. For example, http(s)://.
  • A URI such as a phone number, geographic coordinates, social media link, or email. For example, mailto:@?subject=.
Method Declaration
Copy
Method Parameters
urlstringRequired

The URL to open.

Open a URL in the device's browser
JavaScript
Did this help?

toScreen( )


Opens the specified screen.

developer preview tag

toScreen() returns a promise that resolves when the opened screen closes. Learn more about stack navigation.

Method Declaration
Copy
function toScreen(screenId: string, data: object): Promise<CloseScreenResult>;
Method Parameters
screenIdstringRequired

Name of the screen to open, as defined in the app editor. Learn more about managing your app's screens.


dataData

Data to send to the target screen.

Returns
Return Type:Promise<CloseScreenResult>
Open a feedback screen
JavaScript
import wixNavigateMobile from "wix-navigate-mobile"; import { getFeedbackCategories } from "./feedbackCategories"; const screenToNavigateTo = "feedback"; const feedbackData = getFeedbackCategories(); wixNavigateMobile.toScreen(screenToNavigateTo, feedbackData).then((result) => { if (result.error && result.error !== "") { console.error(result.error); } console.log("Data from feedback screen:", result.data); });
Did this help?