What's Changed
Full-screen Mode
- Mini Apps are now able to become full-screen in both portrait and landscape mode – allowing them to host more games, play widescreen media and support immersive user experiences.
- Added the methods requestFullscreen and exitFullscreen to toggle full-screen mode.
- Added the fields safeAreaInset and contentSafeAreaInset, allowing Mini Apps to ensure that their content properly respects the device's safe area margins.
- Further added the fields isActive and isFullscreen to the class WebApp.
- Added the events activated, deactivated, safeAreaChanged, contentSafeAreaChanged, fullscreenChanged and fullscreenFailed.
Homescreen Shortcuts
- Mini Apps can now be accessed via direct shortcuts added to the home screen of mobile devices.
- Added the method addToHomeScreen to create a shortcut for users to add to their home screens.
- Added the method checkHomeScreenStatus to determine the status and support of the home screen shortcut for the Mini App on the current device.
- Added the events homeScreenAdded and homeScreenChecked.
Emoji Status
- Mini Apps can now prompt users to set their emoji status – or request access to later sync it automatically with in-game badges, third-party APIs and more.
- Added the method setEmojiStatus to let users manually confirm a custom emoji as their new status via a native dialog.
- Added the method requestEmojiStatusAccess for obtaining permission to later update a user's emoji status via the Bot API method setUserEmojiStatus.
- Added the events emojiStatusSet, emojiStatusFailed and emojiStatusAccessRequested.
Media Sharing and File Downloads
- Users can now share media directly from Mini Apps – sending referral codes, custom memes, artwork and more to any chat or posting them as a story.
- Added the method shareMessage to share media from Mini Apps to Telegram chats. Also see PreparedInlineMessage.
- Added the method downloadFile, introducing support for a native popup that prompts users to download files from the Mini App.
- Added the events shareMessageSent, shareMessageFailed and fileDownloadRequested.
Geolocation Access
- Mini Apps can now request geolocation access to users, allowing them to build virtually any location-based service, from games with dynamic points of interest to interactive maps for events.
- Added the field LocationManager to the class WebApp.
- Added the events locationManagerUpdated and locationRequested.
Device Motion Tracking
- Mini Apps can now track detailed device motion data, allowing them to implement better productivity tools, immersive VR experiences and more.
- Added the fields isOrientationLocked, Accelerometer, DeviceOrientation and Gyroscope to the class WebApp.
- Added the methods lockOrientation and unlockOrientation to control the screen orientation.
- Added the events accelerometerStarted, accelerometerStopped, accelerometerChanged, accelerometerFailed, deviceOrientationStarted, deviceOrientationStopped, deviceOrientationChanged, deviceOrientationFailed, gyroscopeStarted, gyroscopeStopped, gyroscopeChanged, gyroscopeFailed.
Full Changelog: 7.10...8.0