Games [XUI2D] Large background class + example - Erel    Jun 14, 2021   (11 reactions) LargeBackground class helps with drawing the game background based on a large image that is split... Files folder. The code itself is very simple: Background.Initialize(Me, "map", "png... - Number of columns Call Background.Tick from the Tick event: Background.Draw(GS) And DrawComplete from the DrawingComplete event: Public Sub DrawingComplete Background.DrawComplete End Sub Note that ivBackground should be public variable. The example shows this map: https://opengameart.org... B4i Tutorial Background playback - Erel    May 17, 2020   (10 reactions) This tutorial explains how you can play local audio files or stream audio while your app is in the background. Standard applications are killed when moved to the background. However you can add the following attribute to your project to mark it as an application that plays audio in the background: #Region Project Attributes #ApplicationLabel: B4i Example #Version: 1.0.0 'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown... B4A Library [B4X] [XUI] SD CreativeBackground - Star-Dust    Mar 20, 2026   (43 reactions) 103731103845
This new library is based on my latest work (here) of gradual backgrounds and....
SD_CreativeBackground
Author: Star-Dust
Version: 0.07
CornerEffectBackground
Fields:
DarkFactor As Float..., BackgroundColor As Int, DepthEdge As Int, cornerRadius As Int) As String
Parameter... As Int, BackgroundColor As Int, DepthEdge As Int, cornerRadius As Int) As B4XBitmap
Initialize As String... B4i Tutorial Background location tracking - Erel    Sep 9, 2018   (5 reactions) background location updates and then your app will continue to run in the background and receive... mark the app for background execution: #PlistExtra: <key>UIBackgroundModes</key>...>Track your location in the background for better ad revenue.</string> #PlistExtra:<key... StartBackground sub instead of Location.Start 2. (optional) Call AllowPauseLocationAutomatically sub... will eventually disconnect when the app is in the background. Edit: September 2018 - Added new required usage... B4A Library [B4X] GradientMaker - cross platform gradient background - Erel    Feb 13, 2025   (19 reactions) 161692 161693 161694
Usage example:
Dim gd As GradientMaker
gd.Initialize
gd.SetGradient(View, "TOP_BOTTOM", Array(XUI.Colors_Red, 0xFF00FF00)) 'same orientations as GradientDrawable.... Games [XUI2D] Parallax Background - Erel    Jun 14, 2021   (6 reactions) 114882 Art source: https://opengameart.org/content/parallax-2d-backgrounds ParallaxBackground class makes it simple to create a multilayer background. The image files should be organized like this, where 0 is the top layer. 114883 The code is very simple: Parallax.Initialize(Me, "layer", "png", 7) 'file names and count Public Sub Tick (GS As X2GameStep) HandleKeys...-background-class-example.131589/post-829748 Note that ivBackground should be public variable. https... B4i Tutorial Background Fetch (Downloads) - Erel    May 3, 2016   (4 reactions) Background fetch feature allows applications to run for a short period of time (up to 30 seconds) while in the background.
The steps required to use this service are:
1. Add the fetch mode...
no.RunMethod("setMinimumBackgroundFetchInterval:", Array(0)) '0 = minimum interval... the screen is on).
#Region Project Attributes
#ApplicationLabel: Background Fetch
#Version: 1... Games [XUI2D] Single Screen Tile Map Example / Hello World With Background - Erel    Sep 27, 2018   (10 reactions) https://www.b4x.com/basic4android/images/SS-2018-09-27_17.09.08.png This example shows how to use X2TileMap to create a single screen game with tiles based background. This means that the background is never scrolled. To avoid drawing issues we want that the size of each tile will be a whole number and that each tile will be square shaped. This is done with: Dim TileSize As Int = Min(X2.MainBC.mWidth / TileMap.TilesPerRow, X2.MainBC.mHeight / TileMap.TilesPerColumn) TileMap... Games [XUI2D] Example Pack - Erel    Oct 2, 2022   (33 reactions)   tags: example games, XUI2D Games Updated thread based on X2 v2.0+: https://www.b4x.com/android/forum/threads/xui2d-x2-v2-0-2021.131279/ Examples: - Hello world (based on Tiled) - Clumsy bird - Mario - Space Invaders - Walking Character - Tiles Map - Joints 1 - Tank Attack - Monster Truck - Ilan's First App - Drawing lines - Newton's Cradle - Collisions - Hello World with tiles based background - Floating Bodies - Mouse... Map example the background is based on a tiles layer. A properly configured Tiled editor should... B4i Library AS Alarm - Alarm clock or keep app active in the background - Alexander Stolte    Jan 24, 2025   (20 reactions) I needed a way to play a sound at a certain time even though the app is in the background. The problem is that the app is paused as soon as it goes into the background, you can delay this by 30 seconds, but if you take longer, the app is stopped and no more code is executed. Now I have found a way... in the background and repeated until the alarm is set to go off, keeping the app active in the background. You can listen to your music normally during this time without any problems, the silent... Page: 1   2   3   4   5   6   7   |