Hi Fam
What is Haptic Feedback?
Your sense of touch provides valuable information about the world around you, and haptics mimic these experiences. If you've played a racing video game and felt the controller vibrate when your vehicle rolled the track, you've experienced haptic feedback. Derived from the Greek word for "touch," this technology allows developers to incorporate the sense of touch into their simulation systems, which enhances the user experience. Additional haptic feedback examples include the sensations you feel when tapping your smartphone's keyboard and using surgical training simulators.
For this example, we wanted to provide haptic feedback when a user does not enter sign in credentials.
1. To experience this for yourself, open this link on your telegram via your mobile device.
On the sign in page, do not enter an email or password and press the sign in button.
The code that makes this possible is this piece here. When the sign in is invalid, an error haptic feedback is pushed to the device.
Related Content:
UI Developed with SithasoDaisy
core.telegram.org
Source Code:
github.com
www.b4x.com
What is Haptic Feedback?
Your sense of touch provides valuable information about the world around you, and haptics mimic these experiences. If you've played a racing video game and felt the controller vibrate when your vehicle rolled the track, you've experienced haptic feedback. Derived from the Greek word for "touch," this technology allows developers to incorporate the sense of touch into their simulation systems, which enhances the user experience. Additional haptic feedback examples include the sensations you feel when tapping your smartphone's keyboard and using surgical training simulators.
For this example, we wanted to provide haptic feedback when a user does not enter sign in credentials.
1. To experience this for yourself, open this link on your telegram via your mobile device.
On the sign in page, do not enter an email or password and press the sign in button.
The code that makes this possible is this piece here. When the sign in is invalid, an error haptic feedback is pushed to the device.
B4X:
Private Sub btnSignIn_Click (e As BANanoEvent)
e.PreventDefault
'reset the validations
mdlSignIn.ResetValidation
'validate each of the elements
mdlSignIn.Validate(email.IsBlank)
mdlSignIn.Validate(password.IsBlank)
'check the form status
If mdlSignIn.IsValid = False Then
pgIndex.TMA.WebApp.HapticFeedback.error
Return
End If
pgIndex.TMA.WebApp.HapticFeedback.success
'get the data on form
Dim data As Map = mdlSignIn.GetData
Log(data)
'do verification
'if verification = false return
'do we remember
If rememberme.Checked Then
'save settings using app name
SDUIShared.SetLocalStorage(Main.AppName, data)
Else
'remove settings
SDUIShared.DeleteLocalStorage(Main.AppName)
End If
'show nav & drawer
pgIndex.UpdateUserName("Anele 'Mashy' Mbanga")
pgIndex.UpdateUserAvatar("./assets/mashy.jpg")
pgIndex.IsAuthenticated(True)
'hide the modal
mdlSignIn.Hide
'pgDashboard.Show(app)
End Sub
Related Content:
UI Developed with SithasoDaisy
Telegram Mini Apps
With Mini Apps developers can use JavaScript to create infinitely flexible interfaces that can be launched right inside…
Source Code:
GitHub - Mashiane/SithasoTMA: Sithaso Telegram Mini App
Sithaso Telegram Mini App. Contribute to Mashiane/SithasoTMA development by creating an account on GitHub.
[Web] Beginning Telegram Mini Apps with BANano
Hi Fam Demo Source Code Let's create some Telegram Mini Apps. What is TMA? These are apps that run inside Telegram. They use Bots to run. Here we go... Related Content https://core.telegram.org/bots/webapps Useful Bots: https://t.me/apprelay_bot https://t.me/BotFather