WebPage Button
Web Page Button is a button that opens in-app browser with a provided URL.
Examples of use
Show any web page inside of Blynk app: documentation, online store, etc
Open your web app (check the placeholders below)
Payment URL
Settings
Link Name: text to be displayed on the button
URL: specifies which URL should be opened in the browser.
You can use placeholders for URL:
deviceID
- device ID in BlynkuserID
- ID of the user pressing the buttonuserEmail
- email of the user pressing the button
Example URL with placeholders:
Lock Size: when On, size of the button will be relative to the text
Open in browser: When ON, pressing the button will open the OS browser. User will leave the Blynk app
Change Button Properties
You can change certain properties of the Widget from your hardware. For that, use this command:
Where:
vPin
is: virtual pin number the widget is assigned towidgetProperty
: property you want to changepropertyValue
: value of the property you want to change
Don't put Blynk.setProperty()
into the void loop()
as it can cause a flood of messages and your hardware will be disconnected. Send such updates only when necessary, or use timers.
Widget Properties you can change from device
You can change the properties onLabel, offLabel, onColor, offColor, onBackColor, offBackColor, label, color, isDisabled, isHidden, and page of the widget from your hardware, or via an HTTP API. The color hexadecimal values in the HTTP API URL must include the hash # character urlencoded as %23.
URL
Change the URL to be open. You can use placeholders described above.
Set a custom ON/OFF background color associated with the widget state
Set a custom ON/OFF label text color associated with the widget state
Set a custom ON/OFF label associated with the widget state
Show/Hide
Widget will be hidden from dashboard. Design your UI so that it doesn't look weird when there is no widget.
Plan your UI layout so that it looks good even if widget is hidden.
Disable/Enable
Widget will be greyed out on UI and users won't be able to tap on it.
Sync to the latest known state
You can update your hardware to the latest datastream value from Blynk.Cloud after your hardware went offline, and then came online again. Use Blynk.syncVirtual()
to update a single virtual pin, or Blynk.syncAll()
to update all virtual pins. See State Syncing for more details.
Last updated