You are on page 1of 27

Index

The page numbers in the index refer to the printed and the PDF versions of this book.
Readers of the Kindle and EPUB versions should use their search facility to find the actual
text.
#AdditionalJar, 229 Action Bar, 120
#AdditionalRes Location, Package, 112 Action Bar Icon, 122
#ApplicationLabel, 110 Action Bar Icons, 255
#CanInstallToExternalStorage, 110 Action Bar in Holo Theme, 120
#CustomBuildAction Step, Command, Action Bar Split, 122
Arguments, 110 Action Bar Title, 122
#DebuggerDisableOptimizations Value, ACTION_APPWIDGET_UPDATE, 371
111 ACTION_CALL, 371
#DebuggerForceFullDeployment, 112 ACTION_DOWN, 333
#DebuggerForceStandardAssets, 112 ACTION_EDIT, 371
#ExcludeFromDebugger Attribute, 175 ACTION_MAIN, 371
#ExcludeFromLibrary, 230 ACTION_MOVE, 333
#Extends ClassOrActivity, 236 ACTION_PICK, 371
#FullScreen Value, 236 ACTION_SEND, 371
#IncludeTitle Value, 236 ACTION_UP, 333
#SignKeyFile, 112 ACTION_VIEW, 371
#SignKeyPassword, 112 ActionBarHomeClick, 332
#SupportedOrientations Value, 111 Activities that Extend Classes, 249
#VersionCode Value, 111 Activities vs Windows Forms, 243
#VersionName Name, 112 Activity, 331
%x and %y, 129, 161 Activity Attributes, 236
“External” Storage, 359 Activity Attributes Region, 81
“Immediate Window” vs. “Logs” Tab, 328 Activity Concept, 235
“Internal” Storage, 359 Activity Events, 238, 332
About Full Versions, 101 Activity Global Variables, 233
About JSON, 484 Activity Life Cycle, 237
About NFC, 493 Activity Members, 333
About the Author, 41 Activity Methods, 163
Abs, 301 Activity Module, 232, 235
Abstract Designer, 154 Activity Properties, 143
Academic Licenses, 101 Activity.Finish vs ExitApplication, 242
Accessibility Library, 449 Activity.RerunDesignerScript, 163
Accessiblity, 449 ADB Client, 184
Accessing other modules, 252 ADB Daemon, 184
Accuracy, 473 ADB Server, 184
AccuracyValid, 473 AdBuddiz, 261
Acknowledgements, 42 Add, 343, 375, 429
ACos, 301 Add a button, 59
ACosD, 301 Add a field, 226
Acronyms, 39 Add code to button, 65
Action, 371 Add Elements, 373
2 Index
Add Files, 87 AddToMediaStore, 515
Add Only Normalized Variants, 149 AddTwoLines, 415
AddActivityText, 115 AddTwoLines2, 415
AddAll, 375, 429 AddTwoLinesAndBitmap, 415
AddAllAt, 375 AddTwoLinesAndBitmap2, 415
AddApplicationText, 115 AddView, 334, 418, 565, 566
AddCatchAllState, 357 AddView Menu, 139
AddCategory, 371 Adiquity, 555
AddCheckBox, 521, 522 AdiQuity, 261
AddEditText, 521, 522 Administrator Library, 450
AddHandleActionEvent, 481 AdminManager, 450
AddHeightChangedEvent, 482 AdMob, 261, 555
Adding a class module, 246 Advertising, 124
Adding Code for the Button, 64 AirplaneModeChanged, 506
Adding Entry, 378 Alarms, 135
Adding Files to your Project, 359 Allocating Values, 274
Adding Other Variants, 149 Allowed Characters, 113
Adding records, 224 Allowed Screen Orientation, 127
Adding views by code, 128 Alternative to an Activity, 250
Adding views in code, 158 Altitude, 473
Additional Libraries, 107 AltitudeValid, 473
Additional Libraries and Modules, 555 Amazon Appstore, 263
Additional libraries folder, 443, 555 Analytics, 556
Additional Official Libraries, 443, 555 Anchors, 145
Additional User Libraries, 443, 560 And, 338
AdditionalLibs$, 112 Android 5 Device Compatibility, 124
AddList, 521, 522 Android Character Sets, 361
AddManifestText, 115 Android Debug Bridge, 184
AddMenuItem, 333 Android Screen, 119
AddMenuItem2, 333 Android Themes, 124
AddMenuItem3, 334 Android Version, 168
AddNonQueryToBatch, 538 Android Versions, 117
AddPermission, 115 Android Virtual Devices, 186
AddPreferenceCategory, 521, 523 Android.jar, 107
AddPreferenceScreen, 521, 523 Android’s View of Services, 250
AddReceiverText, 115 AndroidSDK$, 112
AddReplacement, 115 Animating Bitmaps, 208
Address, 517, 532, 549 Animating your App, 124
AddServiceText, 115 Animation, 451
AddSingleLine, 414 Animation Library, 451
AddSingleLine2, 415 AnotherDatePicker class, 555
AddState, 357 AnswerCall, 535
AddState2, 357 Anywhere Software, 265
AddTab, 432 APK File, 258
AddTab2, 432 App Design Step by Step, 119
AddTabWithIcon, 432 App or Widget ?, 129
AddTabWithIcon2, 432 Append, 393
Index 3
Appending to a Map, 379 B4A Site License, 101
Application, 337 B4A Standard Version, 101
Application Members, 337 B4A’s Language, 268
AppLovin, 261 B4A-Bridge, 48, 182
Approve the app on your device, 54 B4AHelp, 266
ApproximateScreenSize, 373 B4XCipher, 463
ARGB, 339, 562, 563, 564 B4XEncryption Library, 462
Array, 301 Back, 438
Array Dimensions are Fixed, 279 Background, 159, 334, 397, 400, 402, 405,
Arrays, 277 407, 409, 411, 415, 418, 421, 422, 424,
Arrays of Objects, 279 426, 429, 432, 434, 436, 439, 461, 470
Asc, 302 Background Property, 197
ASCII, 362 Backward Compatible, 118
ASin, 302 BASIC, 268
ASinD, 302 Basic Design Principles, 119
AsyncStreams, 523 BatteryChanged, 506
AsyncStreamsText, 556 BCC, 500
ATan, 302 Bearing, 473
ATan2, 302 BearingTo, 473
ATan2D, 302 BearingValid, 473
ATanD, 302 Beep, 455
Attachments, 500 Beeper, 455
Attributes, 110, 549, 552 BeginTransaction, 538
Audio, 556 Benefits of Classes, 244
Audio Library, 453 Benefits of creating Libraries, 445
AudioRecordApp, 454 Better Uncaught Runtime Exception
Auto Hide, 99 Handling, 298
AutoCancel, 383 Bit, 337
Autocomplete, 82 Bitmap, 346, 347, 348, 409, 469
Autocomplete event subroutines, 83 BitmapData, 469
Autocomplete Properties and Methods, 83 BitmapDrawable, 197, 347
AutoCompleteEditText, 396 Bitmaps, 196
AutoFocus, 464 BitmapsData, 470
Automatic Conversion of String to Bitwise Operations, 337
Number, 389 Black, 339
AutoRegistration, 534 Block Completion, 85
AutoScale, 165 Blue, 339, 562
AutoScale Layouts for Different Sized Bluetooth Low Energy, 556
Devices, 163 BluetoothAdmin, 530
AutoScaleAll, 165 Body, 500, 517
AutoScaleRate, 164 Bookmark Substitute, 90
AVD Name, 187 Boolean, 269
Azimuth, 472 Boolean Operations, 322
B4A, 268, 328 Bottom, 356
B4A Designer, 50 BOTTOM, 340
B4A Enterprise Version, 101 Branding and Marketing, 254
B4a Object Browser, 266 Breakpoint, 54
4 Index
Breakpoint Limitations, 175 Case, 327
Breakpoints, 48, 175 CASE_INSENSITIVE, 317, 385
BringToFront, 397, 400, 402, 405, 407, Casting, 281
409, 411, 415, 418, 421, 422, 424, 426, Catch, 303
429, 432, 434, 436, 439, 461, 470 Caution Name cannot be changed, 114
Buffer, 552 CC, 500
Build Configuration, 168 cE, 304
Build Configuration List, 169 Ceil, 304
BulkTransfer, 548 CENTER, 340
Button, 400 CENTER_HORIZONTAL, 340
By Email, 263 CENTER_VERTICAL, 340
Byte, 269 CenterX, 356
Byte Order Marks, 362 CenterY, 356
BytesAvailable, 367, 527 Change an Element, 374
BytesToString, 302 Change grid, 141
CachedName, 494 Changing Text Appearance, 413
Call, 505 Char, 270
Call Stack, 176 CharAt, 391
CallEnded, 534 CharsToString, 304
CallError, 534 Charts Framework, 208
CallEstablished, 534 Chat Room, 265
Calling, 534 Check if a Map contains an entry, 379
Calling a sub, 323 Check if the Java JDK is already
Calling a Sub, 291 installed, 101
Calling a Sub from another module, 291 CheckBox, 402
CallItem, 494 CheckChanged, 296
CallLog, 495 Checked, 402, 422, 434
CallRinging, 534 CheckedChange, 422
CallSub, 302 Checking to see if the driver is already
CallSub2, 303 installed, 183
CallSub3, 303 Checking Version-Dependent
CallSubDelayed, 303 Compatibility, 118
CallSubDelayed2, 303 ChosenName, 567
CallSubDelayed3, 303 Chr, 304
CallType, 494 Class Circle module, 247
Camera, 463, 556 Class module, 244
Camera Library, 463 Class Square module, 247
CameraEx, 556 Class structures, 246
Cancel, 383 Class_Globals, 233, 479
CANCEL, 340 Classes and Activity Object, 249
CancelAutoFocus, 464 Classes Attributes, 446
CancelDiscovery, 531 Classes vs Code Modules, 246
CancelScheduledService, 303 Classes vs Types, 246
Cannot Change Dimensions, 278 Clear, 375, 379, 415, 429
Canvas, 348, 468, 486 Clear a List, 374
Canvas Object, 200 Clear all items from the map, 379
CaptureBitmap, 439 ClearAll, 492, 521
Index 5
ClearNotification, 492 Conditional Manifest Commands, 116
ClearQueue, 456 Conditional statements, 284
Click, 295, 332, 400, 409, 411, 418, 432, Configure Paths, 106
436 Configure the Device, 182
ClipPath, 348 Configure your button, 61
Close, 367, 368, 370, 488, 489, 491, 523, ConfigureHomeWidget, 304
527, 528, 534, 536, 538, 546, 547 Connect, 140, 489, 532
CloseFile, 456 Connect the Designer to your device., 59
CloseMenu, 334 Connect the IDE to the device, 49
CloseSynchronous, 548 Connect2, 532
Closing a Module, 78 Connect3, 532
Code, 38, 79 Connected, 489
Code area, 79 Connecting the Debugger to a Device or
Code header, 81 Emulator, 181
Code module, 249 Connecting the Device via USB, 182
CodeModule, 232 ConnectInsecure, 532
Color, 334, 397, 400, 402, 405, 408, 410, Connection Status, 140
411, 415, 418, 421, 422, 424, 426, 429, ConnectivityChanged, 506
432, 434, 436, 439, 461, 470 Constants, 269, 326, 330, 339
ColorDialog, 562 Contact, 496
ColorDialogHSV, 563 Contacts, 497
ColorDrawable, 197, 354 Contacts2, 498
ColorPickerDialog, 564 Contains, 391
Colors, 323, 339 ContainsKey, 379
ColumnCount, 536 ContentChooser, 499
Combine, 363 ContentEncoding, 477
Command Line Compiler, 171 ContentLength, 477
Commenting and uncommenting code, 81 ContentResolver, 465
Comments, 84, 268, 269 ContentResolver Library, 464
Common Properties, 145 ContentType, 477
Commonest View Events, 295 ContentValues, 466
Communicating with your User, 131 Context Menu, 85
CompareTo, 391 Context menus, 157
Comparison of Process_Globals and Continue, 288, 305
Globals Variables, 237 ContinueListening, 548
Compilation Modes, 169 Continuing the Run, 56
Compile Options, 71 Controlling Outlining, 80
Compiler Warning, 118 Controls vs. Views, 322
Compiling, 168 ControlTransfer, 548
Compiling for Android 5.0 Lollipop, 179 Conventions Used in this Book, 38
Compiling the APK, 260 Convert Array to List, 374
Compiling your new app, 53 ConvertToMinutes, 473
Compiling, Debugging & Testing, 168 ConvertToSeconds, 473
Complete, 458, 479 Copy, 363
CompressBytes, 526 Copy2, 363
CompressedStreams, 524 CopyDBFromAssets, 216
Conditional Compilation, 169, 171 Copying a Drawable onto a Canvas, 202
6 Index
Core Library, 443 Database Creation, 223
Core Object Events, 292 Database Administration, 214
Core Objects, 330 Database Files, 213
Core Types, 270 Database fundamentals, 211
CornerRadius, 355 Databases, 211
Cos, 305 Date, 344, 494, 517
CosD, 305 DateDialog, 566
Count, 527, 528 DateFormat, 344
Count Records, 225 DateParse, 344
CountingInputStream, 526 DateTicks, 566
CountingOutputStream, 527 DateTime, 343
cPI, 305 DateTimeParse, 344
CPU ABI, 187 DateUtils Library, 467
CreateEvent, 483 Daydream, 468
CreateEventFromUI, 483 Daydream Library, 468
CreateIntent, 521, 523 DayOfMonth, 567
CreateMap, 305 Days, 468
CreateNew, 342 DBMS Apps, 214
CreateObject, 572 DBMS Tools, 214
CreateObject2, 573 DBUtils, 215, 556
CreateTable, 216 DBUtils Field Types, 216
Creating a Device Definition, 190 DBUtils Functions, 216
Creating a Menu, 243 DBUtils Fundamentals, 215
Creating a New Key, 259 Debug Legacy Mode, 170
Creating an AVD, 186 Debug Menu, 76
Creating Icons, 255 Debug Menu Offers More Control, 176
Creating Libraries, 445 Debug Rapid Mode, 170
Creating or Adding Modules, 228 Debug Window, 55, 176
Creating or Loading a Private Key, 258 Debugger Control, 175
Creating the Page, 240 Debugging, 47, 173
Creating Tooltips for Subs, 292 Debugging Certificates, 258
Creating Your Own Types, 271 Debugging Communication Channels, 181
CRLF, 305 Debugging over a USB Connection, 184
CurrentOffsetX, 486 Debugging with USB, 185
CurrentOffsetY, 486 Decimal, 570
CurrentPosition, 528 DecimalChar, 570
CurrentTab, 433 Declare SQL Object, 214
CurrentUserIdChanged, 456 Declaring a Sub, 291, 323
Cursor, 223, 536 Declaring an Array, 277
CustomDialog, 565 Declaring Types, 280
CustomDialog2, 566 Declaring Variables, 273
CustomeListView, 556 DecodeBase64, 541
CustomView, 403 DecodeUrl, 541
Cyan, 339 DecompressBytes, 526
DarkGray, 339 Decrypt, 463
Data, 489 DEFAULT, 343
Database, 211 Default Modules, 109
Index 7
Default Type, 277 DirAssets, 364
Default Uncaught Runtime Exception DirDefaultExternal, 364
Handling, 297 Direction, 549
DEFAULT_BOLD, 343 DirInternal, 364
Defaults, 236 DirInternalCache, 364
Defining a Build Configuration, 168 DirRootExternal, 364
Delete, 363, 465, 469 Disable, 450, 531
DeleteRecord, 216 DisableAccessibility, 334
DeleteRingtone, 516 Disconnect, 140, 532
Deleting data, 226 Discovering the API of the current device,
Deleting Watches, 178 119
Density, 305 DiscoveryStarted DiscoveryFinished, 531
Description, 547 DismissDropDown, 397
Designer, 70, 126 DisplayName, 496, 534
Designer Scripting Basics, 161 DistanceTo, 473
Designer Scripts, 158 Distributing Apps elsewhere, 263
Designer Scripts and Activity Code, 159 Divide by Zero, 326
Designer Scripts Reference, 159 Do not add too many variants, 149
Designing Your App, 117 Dock and Fill Strategy, 161
DestRect, 469 Docking, 93, 95
Detailed explanation of how If-Then-Else- Docking a Module, 95
End If works, 284 Docking Windows, 97, 98, 139
Detecting Device Orientation, 127 Does the device have a keyboard?, 129
Device, 187 DoEvents, 306, 324
DeviceClass, 547 Double, 270
DeviceDefaultDateFormat, 344 Do-Until, 290
DeviceDefaultTimeFormat, 344 Do-While, 289
DeviceFound, 531 Do-While may not be executed, 289
DeviceId, 547 Down, 400
DeviceName, 547 Download, 480
DeviceStorageLow, 507 Download and install B4A, 105
DeviceStorageOk, 507 Download B4A Trial, 45
DeviceSubclass, 547 Download2, 480
Diagrams Charts, 208 Downloading from a website, 263
DialogResponse, 340 Downloading User Libraries, 560
Dialogs Library, 134, 561 dpi dots per inch, 160
Differences between B4A and Visual Dragging Windows, 95
Basic, 285, 287, 288, 290 Drawable, 147
Different Layouts for Portrait and Drawables, 197
Landscape, 165 DrawBitmap, 204, 348
Digits, 570 DrawBitmapFlipped, 349
Dim, 306, 322 DrawBitmapRotated, 204, 349
Dim Statement, 273 DrawCircle, 204, 350
Dimensions, 277 DrawColor, 205, 350
dip, 160 DrawDrawable, 350
dips, 128 DrawDrawableRotate, 350
DipToCurrent, 129, 306 Drawing Methods, 196
8 Index
Drawing Objects, 330, 346 EndCall, 536
Drawing onto a Canvas, 201 EndElement, 553
DrawLine, 205, 351 End-of-Line Character, 362
DrawOval, 351 EndpointCount, 550
DrawOvalRotated, 351 EndpointNumber, 549
DrawPath, 351 EndsWith, 391
DrawPoint, 352 EndTransaction, 539
DrawRect, 205, 352 EngineDestroyed, 487
DrawRectRotated, 205, 352 EnterPressed, 397, 404
DrawText, 205, 352 EqualsIgnoreCase, 391
DrawTextRotated, 205, 353 Error, 523
DreamStarted, 468 Error converting Floating Point numbers
DreamStopped, 468 to Strings, 271
DropBox Sync, 556 Error converting String to Int, 271
DropdownBackgroundColor, 429 Error Handling, 297
DropdownTextColor, 429 Error message “Are you missing a library
Dropping a Table, 224 reference?”, 444
DropTable, 216 Error Trapping, 328
Duration, 381, 452, 458, 461, 494 ErrorMessage, 480
Edit Menu, 68 Escaping end of string characters, 114
Editing Code using the Rapid Debugger, Escaping XLM HTML, 390
174 Event, 422, 428, 434, 454
Editing Settings, 125 Event AnimationEnd, 451
Editing the Manifest, 118 Event Complete, 381, 461
Editing Views in a program, 166 Event Connected, 489, 532
Editor Warnings of Undeclared Variables, Event LogCatData, 501
273 Event MessageReceived, 517
EditText, 404 Event NewConnection, 488
Elevation, 418, 472 Event NewData, 548
ElseIfEndIf, 323 Event PacketArrived, 491
Email, 500 Event PickerResult, 515
EMAIL_CUSTOM, 496 Event Ready, 544
EMAIL_HOME, 496 Event RecordComplete, 460
EMAIL_MOBILE, 496 Event Result, 500, 519
EMAIL_OTHER, 496 Event SensorChanged, 510
EMAIL_WORK, 496 Event Tick, 394
Emulation Options, 189 Example, 128, 166, 215, 244, 293, 303,
Emulator or Android Virtual Device 305, 395, 428, 481, 544, 572
Manager, 185 Example Code, 198
Enable, 450, 531 Example of a UI Cloud screen, 142
Enabled, 395, 397, 400, 402, 405, 408, 410, Example Program, 205
411, 415, 418, 421, 423, 424, 426, 429, Example Project, 200
433, 434, 436, 439, 450, 461, 470 Examples, 111, 308
EncodeBase64, 541 Examples of Java Regex Constructs, 283
EncodeUrl, 541 Excel, 557
Encrypt, 463 Exception, 358
Encrypting Databases, 213 Exceptions, 297
Index 9
Exchanging files with the PC, 194 Files Window, 152
ExecNonQuery, 539 FILL, 340
ExecNonQuery2, 539 Filling an array using the Array keyword,
ExecNonQueryBatch, 539 278
ExecQueries and ExecNonQueries, 222 Filtering, 225
ExecQuery, 539 Find, 313
ExecQuery2, 539 Find All References, 89
ExecQueryAsync, 226, 539 FindByMail, 497, 498
ExecQuerySingleResult, 540 FindByName, 497, 499
ExecQuerySingleResult2, 540 Finding Your Folder Locations, 360
Execute, 475 Finish, 335, 468
ExecuteCredentials, 475 FirstTime parameter, 239
ExecuteHtml, 217 Fixing Order in a Map, 379
ExecuteJSON, 217 Flags, 371
ExecuteListView, 217 Flip, 469
ExecuteMap, 218 FLIP_BOTH, 469
ExecuteMemoryTable, 218 FLIP_HORIZONTALLY, 469
ExecuteSpinner, 219 FLIP_NONE, 469
Exists, 364 FLIP_VERTICALLY, 469
Exit, 288, 306, 323 Float, 270
Exit a Loop, 290 Floating, 93
Exit Sub, 324 Floor, 307
ExitApplication, 307 Flush, 367, 370, 528
Explanation of Sub’s name, 65 FocusChanged, 397, 405
Expressions and Operators, 281 FocusDone, 463
ExternalReadable, 364 Folder locations on Device, 359
ExternalWritable, 364 For, 307
ExtrasToString, 371 For – Next, 287
False, 307 For Each, 307
FastScroll, 568 For the Beginner, 37
FastScrollEnabled, 415 For the Professional, 37
Field, 211 For…Next, 323
Field Type, 212 ForceDoneButton, 397, 405
File, 189, 307, 363 For-Each, 288
File Menu, 68, 139 Foreword by Erel Uziel, 36
File Object, 358 Format, 324
File Objects, 331 Formatting Date and Time, 390
File.DirAssets, 359 Formatting Numbers, 389
File.DirDefaultExternal, 360 Forum, 265
File.DirInternal, 359 Forward, 439
File.DirInternalCache, 359 Free Upgrades, 41
File.DirRootExternal, 360 FromParts, 467
FileDialog, 567 Front Back Camera, 188
FileFilter, 568 Fulfilling Wants and Needs, 117
Filenames, 358 FullScreen, 468
FilePath, 568 FullScroll, 408, 424
Files Manager, 87 FullWallpaperHeight, 486
10 Index
FullWallpaperWidth, 486 GetDeviceId, 508
Functions, 324 GetDeviceLayoutValues, 308
GamePad, 557 GetDevices, 550
GameView, 470 GetDouble, 537
GameView Library, 469 GetDouble2, 537
General, 330 GetEmails, 496
Generate Members, 62, 140 GetEnd, 313
Generating Exceptions, 390 GetEndpoint, 550
Generating Your APK, 258 GetExtra, 371
Get, 375, 379 GetField, 483, 573
Get the size of a List, 374 GetField2, 573
GetAccessories, 550 GetFieldInfo, 573
GetActiveNotifications, 492 GetFieldJO, 483
GetActivity, 573 GetHeaders, 477
GetActivityBA, 573 GetHour, 344
GetAll, 495, 498, 499, 518, 522 GetHtmlIntent, 500
GetAllSince, 518 GetInputStream, 477, 480
GetAllViewsRecursive, 335, 418 GetInstalledPackages, 501
GetApplicationIcon, 501 GetInt, 537
GetApplicationIntent, 501 GetInt2, 537
GetApplicationLabel, 501 GetIntent, 500
GetArray, 573 GetInterface, 547
GetAsTextType, 493 GetItem, 416, 429
GetAsUriType, 493 GetKeyAt, 380
GetAsynchronously, 477 GetLine1Number, 508
GetB4AClass, 573 GetLong, 537
GetBetweenDates, 518 GetLong2, 537
GetBitmap, 480 GetMaxVolume, 502
GetBlob, 536 GetMethod, 573
GetBlob2, 537 GetMinute, 344
GetBoolean, 522 GetMonth, 345
GetById, 495, 498, 499 GetMostCurrent, 574
GetByPersonId, 518 GetMyIP, 488
GetBytes, 391 GetMyWifiIP, 488
GetByThreadId, 518 GetName, 553
GetByType, 518 GetNdefRecords, 493
GetColumnName, 537 GetNetworkOperatorName, 502
GetContactsAsync, 499 GetNetworkType, 502
GetContactsByQuery, 499 GetPairedDevices, 532
GetContext, 573 GetPaletteAt, 564
GetData, 371 GetPayload, 493
GetDataState, 502 GetPhones, 496
GetDayOfMonth, 344 GetPhoneType, 502
GetDayOfWeek, 344 GetPhoto, 496
GetDayOfYear, 344 GetPixel, 346
GetDBVersion, 219 GetProcessBA, 574
GetDefault, 380, 516 GetProxy, 574
Index 11
GetPublicField, 574 GPS Library, 471
GetRawDescriptors, 549 GPSEnabled, 472
GetRequest, 480 GPSSatellite, 472
GetResourceDrawable, 502 GpsStatus, 471
GetRingerMode, 503 GradientDrawable, 197, 355
GetSecond, 345 Graphics and Drawing, 196
GetSettings, 503 Gravity, 340, 347, 397, 400, 402, 405, 410,
GetSimOperator, 503 411, 423, 434
GetSimSerialNumber, 508 Gray, 339
GetSince, 496 Green, 339, 563
GetStart, 313 Group, 313
GetStartingIntent, 335 GroupCount, 314
GetStaticField, 574 HandleAction, 481
GetString, 478, 480, 522, 537 HandleIntent, 492
GetString2, 480, 537 HandleWidgetEvents, 386
GetSubscriberId, 508 Handling Long Lists, 134
getTabContentViewPadding, 578 Handling Modal Dialogs when your App
getTabEnabled, 578 Pauses, 135
getTabHeight, 578 HasAccessoryPermission, 550
getTabHostPadding, 578 HasExtra, 371
getTabTextSize, 578 HasPermission, 550
getTabVisibility, 578 HDPI, 257
GetText, 364 Height, 335, 346, 373, 397, 401, 402, 405,
GetTimeZoneOffsetAt, 345 408, 410, 411, 416, 419, 421, 423, 425,
Getting More Help, 265 426, 429, 433, 434, 436, 439, 461, 470
Getting More Help with Regular HeightChanged, 481
Expressions, 284 Help Menu, 77
Getting Started, 44 Hex Literals, 270
GetType, 308 HideKeyboard, 482, 503
GetUnreadMessages, 518 Highlighting occurrences of words, 86
GetUpdatedKeys, 522 Hint, 397, 405, 569
GetUserFontScale, 449 HintColor, 397, 405, 569
GetValue, 553 Holo Theme, 179
GetValue2, 553 Horizontal Tab Group, 94
GetValueAt, 380 HorizontalScrollView, 407
GetVersionCode, 502 Host, 489
GetVersionName, 502 HostAddress, 490
GetView, 335, 419 Hour, 571
GetVolume, 503 Hours, 468
GetYear, 345 Hovering, 178
Global Const, 323 Hovering over Collapsed Code, 80
Google Maps, 557 How AutoScale works, 164
Google Play Developer Console, 263 How B4A interacts with Emulated
Google Play Services, 557 Devices, 185
Google Play Store Icon, 254 How the Rapid Debugger Works, 174
Google Play URL, 113 How this Book is Organized, 37
GPS, 471
12 Index
How to Access Process_Globals Variables, Importing a Bitmap file into Canvas, 202
235 In the main module, 248
How to Compile a Library, 446 In-App Billing, 261
How to create a library, 560 Include Quotation Marks, 388
How to Detect the Display Size, 127 Indentation, 81
How to manage files, 194 Indeterminate, 421
How to publish your library, 447 Index, 580
How to See the Effect of AutoScale, 164 IndexOf, 375, 391, 429
How to See the Effect of AutoScale on Text IndexOf2, 392
Size, 164 Initialization of Objects, 272
How to Share your Library, 561 Initialization of Process_Globals, 234
How to Start a Service, 250 Initialize SQL Object, 215
How to upgrade, 186 Initialize2, 346, 353, 354, 368, 370, 372,
How to use a library, 560 375, 381, 425, 455, 464, 473, 485, 490,
How to use a List, 373 511, 517, 528, 535
How to use a Map, 378 Initialize3, 346, 528
How to Use AutoScale, 164 InitializeAcceptAll, 475
How variants are shown in Abstract InitializeAlpha, 452
Designer, 149 InitializeArray, 483
HTTP Library, 474 InitializeContext, 483
HttpClient, 474 InitializeDelete, 476
HttpJob, 479 InitializeFromBytesArray, 367
HttpRequest, 475 InitializeGet, 476
HttpResponse, 476 InitializeHead, 476
HttpServer, 557 InitializeMutable, 346
HttpUtils2 Library, 478 InitializeNewInstance, 484
Hue, 563 InitializePost, 476
Hungarian Notation, 276 InitializePost2, 476
Icon, 383 InitializePrefix, 524
Icon Sizes, 256 InitializePut, 476
Icons, 67, 122 InitializePut2, 476
Id, 492, 495, 496, 517 InitializeRotate, 452
IDE Meta File, 92 InitializeRotateCenter, 452
IDE Options Sub-Menu, 75 InitializeSample, 347
If, 308 InitializeScale, 452
If – Then, 284 InitializeScaleCenter, 452
If you already have JDK 64 Bit, 102 InitializeStatic, 484
If-Then-Else-End If, 284 InitializeToBytesArray, 368
If-Then-End If, 284 InitializeTranslate, 453
Ignoring Warnings, 91 InitializeWithPhoneState, 508
ImageView, 409 Initializing a Canvas, 200
IME, 481 Initializing a Recursive Type, 281
IME Library, 481 Inline Code, 441
Immutable Strings, 387 Input, 569
Implementing a Database Relationship, INPUT_TYPE_DECIMAL_NUMBERS,
226 398, 405, 569
Implementing MipMap, 256 INPUT_TYPE_NONE, 398, 405, 569
Index 13
INPUT_TYPE_NUMBERS, 398, 406, 569 Invalidate, 335, 398, 401, 402, 406, 408,
INPUT_TYPE_PHONE, 398, 406, 569 410, 412, 416, 419, 421, 423, 425, 426,
INPUT_TYPE_TEXT, 398, 406, 569 429, 433, 435, 436, 439, 461, 470
InputBox, 324 Invalidate2, 335, 398, 401, 402, 406, 408,
InputDialog, 568 410, 412, 416, 419, 421, 423, 425, 427,
InputList, 132, 308 430, 433, 435, 437, 439, 461, 470
InputMap, 133, 309 Invalidate3, 335, 398, 401, 403, 406, 408,
InputMultiList, 132, 310 410, 412, 416, 419, 421, 423, 425, 427,
InputStream, 366, 547 430, 433, 435, 437, 439, 461, 470
InputStream.io.InputStream, 489, 533 InvokeMethod, 574
InputStreamToBytes, 338 Is, 311
InputType, 398, 406, 569 Is24Hours, 571
Insert, 393, 465 IsAirplaneModeOn, 503
InsertAsync, 465 IsBackgroundTaskRunning, 311
InsertAt, 375 IsDevTool, 311
InsertMaps, 220 IsDirectory, 364
Insistent, 383 IsEnabled, 531, 533
Install and configure B4A, 105 IsHardwareAccelerated, 470
Install and Run the Trial, 45 IsInCall, 536
Install from APK, 184 IsInitialized, 314, 335, 343, 347, 355, 356,
Install the 32 bit Java JDK, 102 358, 367, 368, 369, 370, 372, 375, 380,
Install the Android SDK and a platform, 383, 393, 396, 398, 401, 403, 406, 408,
102 410, 412, 416, 419, 421, 423, 425, 427,
Install the B4A-Bridge app on your device, 430, 433, 435, 437, 439, 453, 456, 458,
48 461, 467, 468, 470, 472, 474, 475, 480,
Install the SDK, 102 484, 485, 486, 488, 489,490, 491, 492,
Install the USB Driver, 183 493, 500, 524, 527, 528, 531, 533, 535,
Installation, 102 536, 537, 540, 545, 546, 548, 549, 550,
Installing .NET Framework, 45 552, 553
Installing DBUtils, 215 IsMatch, 317, 385
Installing from the APK, 118 IsMatch2, 317, 386
Installing Icons, 257 IsMuted, 536
Installing the Trial Version, 45 IsNdefIntent, 493
Instr, 328 IsNetworkRoaming, 503
Int, 270 IsNull, 574
Intent, 371 IsNumber, 311
Interacting with your Virtual Device, 192 IsPaused, 311
Interactive, 468 IsPlaying, 381, 458, 462
InterfaceClass, 550 IsPreview, 486
InterfaceCount, 547 IsSipSupported, 535
InterfaceProtocol, 550 IsSupported, 519
InterfaceSubclass, 550 IsVisible, 486
Internal Storage, 189 IsVoipSupported, 535
Interval, 395, 549 ItemClick, 397, 414, 428
Introduction, 37, 185, 443, 448, 555, 560 ItemLongClick, 414
Iterate a List, 374
Iteration, 378
14 Index
Java JDK and Android SDK Installation, Legacy vs Rapid Debugger, 48
101 Len, 327
Javac.exe, 107 Length, 392, 393, 490
JavaObject, 483 Length of an Array, 279
JavaObject Library, 482 Lexical Rules, 268
JavaScriptEnabled, 439 Libraries, 443
JetPlayer, 455 Libraries Manager, 86
JobName, 480 Libraries Supporting Advertising, 260
JSch, 557 Library and Tutorial, 261
JSON Library, 484 Library Browsers, 266
JSONGenerator, 485 Library compilation attributes, 113
JSONParser, 485 Library specific attributes, 446
JTidy, 557 License, 106, 561
KeepAlive, 514 Licensing, 262, 558
Key Concepts, 159 Lifetimes of Process_Globals Variables,
Keyboard, 188 234
KeyboardPopUp, 568 Light, 383
KeyCodes, 340 LightGray, 339
KeyPress, 296 Limitations of Classes, 249
KeyPress and KeyUp, 239 Limitations of the Rapid Debugger, 173
KeyPress and KeyUp Events, 332 LineTo, 356
Keys, 380 Linked In, 266
Keys and Certificates, 258 List, 373
KeyStore, 259 List of Additional Libraries, 555
Keystore Explorer, 260 List of Core Objects, 330
KeyValueStore, 557 List of libraries, 560
KeyValueStore Class, 213 List of Standard Libraries, 448
Keywords, 301 List of types, 449, 450, 451, 453, 463, 465,
Label, 411 468, 469, 471, 474, 481, 485, 486, 487,
LabelName, 337 493, 520, 523, 530, 534, 536, 541, 546,
Language, 519 552, 562, 572
LastException, 311 Listen, 488, 519, 533
LastIndexOf, 392 Listen2, 533
LastIndexOf2, 392 ListenInsecure, 533
LastModified, 365 ListenToExternalTimeChanges, 345
LastTimeContacted, 496 ListFiles, 365
Latitude, 474 Lists, 279
Launcher Icon, 254 ListView, 413
Layout, 126 LiveWallpaper Library, 486
Layouts, 138 Load, 381, 458
LayoutValues, 127, 372 Load the Layout, 65
Left, 335, 357, 398, 401, 403, 406, 408, LoadBitmap, 312
410, 412, 416, 419, 421, 423, 425, 427, LoadBitmapSample, 312
430, 433, 435, 437, 439, 462, 470 LoadCSV, 541
LEFT, 340 LoadCSV2, 542
Left$ and Right$, 327 LoadFile, 456
Legacy Debugging, 174 LoadFromAssets, 343
Index 15
LoadHtml, 440 Match, 314
LoadLayout, 336, 419 Match Chosen Variant, 156
LoadUrl, 440 Matcher, 312, 317, 386
LoadVideo, 462 Matcher Groups, 312
Local Variables, 237 Matcher Methods, 313
Local variables in Subs, 233 Matcher Object, 385
Location, 473 Matcher2, 317, 386
Location of Database, 216 Material Design, 179
LocationChanged, 471 Material Themes in WYSIWYG Designer,
LocationSettingsIntent, 472 179
LockScreen, 450 Mathematical expressions, 281
Log, 312 Max, 314, 427
Logarithm, 312 Max and Min Values, 225
LogCat, 501 MaximumTimeToLock, 450
LogCatStart, 501 MaxPacketSize, 549
LogCatStop, 501 MaxTracks, 456
Logging, 178 MaxValue, 511
Logging Events, 56 MDPI, 257
Logical Operators, 282 Me, 314
Logs Window, 89 Meaningful names, 268
Long, 270 MeasureMultilineTextHeight, 542
LongClick, 295, 332, 400, 409, 411, 418, MeasureStringHeight, 353
432, 436 MeasureStringWidth, 354
Longitude, 474 MediaControllerEnabled, 462
Loop, 324 MediaPlayer, 381
Loop structures, 287 MediaPlayerStream, 457
Looping, 381, 458 Member, 505
Loops, If-Then, Select Case, 323 Memory Options, 188
LWEngine, 486 Menu, 123
LWManager, 487 Menu Overlay, 126
Mac Keyboard Shortcuts, 193 Merchant Account, 262
Magenta, 339 Message, 358
Main Activity Excluded, 446 Methods, 163
Main Module, 109 Min, 314
Main Properties, 144 Minute, 571
MakeCall, 535 Minutes, 468
MakeDir, 365 Missing Tabs, 186
Making the Canvas Draw Itself, 203 Modal Dialogs, 131
Managing Permissions, 130 Model, 503, 547
Managing Settings, 125 Module Attributes, 229, 446
Manifest, 114 Module Menu, 93
Manifest commands, 114 Module Tabs, 78
Manifest Editor, 114 Modules, 70, 109, 228
Manifest Typing, 222 Modules Containing Process_Globals, 234
Manufacturer, 503, 547 Modules Window, 88
Map, 377 Monetising Your App, 260
Maps, 280 Monitor dpi, 192
16 Index
MONOSPACE, 343 No Home Screen Widget Libraries, 447
Month, 567 No Option Explicit, 273
Months, 468 No Scaling, 192
More about Debugging, 57 NO_GRAVITY, 340
More about Designer, 66 Non-integer Iterators, 287
More about Regex, 385 Non-Primitive Types, 270
More Advice, 124 NonQueryComplete, 538
More Complex Examples, 207 Normalized Variants, 149
More information, 116 Not, 315, 322, 338
More Information, 243 Note that SQLite is Different, 212
More Information on SQLite, 222 Notes, 106, 116, 497, 561, 572
Most common Canvas functions, 204 Notes on Starter Service, 109
Moving a Tab Group, 98 Notes on Wireless Connection, 49
Msgbox, 131, 314 Notification, 382, 492
MsgBox, 325 Notification Icon Recommendations, 256
Msgbox2, 131, 314 NotificationListener Library, 491
MtpDevice, 546 Notifications, 119, 135, 252
Multiline, 308 Notify, 383
MULTILINE, 317, 386 Now, 345
Multi-line String, 388 Null, 315
Multiple activities, 126 Number, 383, 495, 570
Multiple Activity Modules, 243 Number formatting, 300, 388
Multiple Variants, 148 NumberDialog, 570
Mutable Strings, 299, 388 NumberFormat, 315
myClass module, 232 NumberFormat2, 315
Name, 497, 533, 552 NumberOfViews, 336, 419
Naming, 291 OAuth, 558
Naming of Variables, 276 Objects, 271
Navigate Backward Forward, 90 Offset, 490
Navigation Bar, 119 OffsetChanged, 487
Navigation Drawer, 124 OnGoingEvent, 384
Navigation Tree, 120 On-line Documentation, 266
NdefRecord, 493 On-line Link, 450
NEGATIVE, 340 On-Line Tutorials, 266
Net, 558 Open, 139, 546
Network Library, 487 Open B4A, 106
New, 139 OpenAccessory, 550
New Variant, 148 OpenBrowser, 508
NewData, 523 OpenDevice, 550
Newsletter, 41 Opening the Channel, 181
NextArray, 485 OpenInput, 365
NextObject, 485 OpenMenu, 336
NextValue, 486 OpenOutput, 365
NFC, 493 Options, 385
NFC Library, 493 Or, 338
NinePatchDrawable, 200 Ordering, 225
NMEA, 472 Other Activity Attributes, 236
Index 17
Other App Publishers, 263 Path, 356
Other Examples, 277 Pause, 381, 456, 458, 462
Other Keywords, 163 PayPal, 558
Other Properties, 163 PC Keyboard Shortcuts, 193
Out of Memory Errors, 209 PDF Guides, 266
OutboundProxy, 535 PeerUri, 536
Output, 447 Percentage of Activity, 129
OutputQueueSize, 524 Period, 467
OutputStream, 367, 547 Permission
OutputStream.io.OutputStream, 489, 533 android.permission.INTERNET, 491
Overflow, 122 Permissions, 383, 438, 457, 463, 471, 474,
Overlays, 126 488, 489, 493, 495, 497, 498, 501, 505,
OverrideUrl, 438 508, 512, 513, 514, 515, 517, 518, 530,
Package name, 113 532, 534
Package Name, 254 PersonId, 517
Package Options, 71 PerXToCurrent, 129, 315
PackageAdded, 507 PerYToCurrent, 316
PackageManager, 501 Phone, 502
PackageName, 337, 493 Phone Library, 494
PackageRemoved, 507 PHONE_CUSTOM, 497
PageFinished, 438 PHONE_FAX_HOME, 497
Palette, 564 PHONE_FAX_WORK, 497
Panel, 408, 418, 425, 468 PHONE_HOME, 497
Parameterize the Command, 225 PHONE_MOBILE, 497
Parameters, 291 PHONE_OTHER, 497
Parents, 553 PHONE_PAGER, 497
Parse, 467, 553 PHONE_WORK, 497
Parse2, 553 PhoneAccelerometer, 505
ParseId, 467 PhoneCalls, 505
ParseInt, 338 PhoneEvents, 506
Part 1 Basics, 43 PhoneId, 508
Part 2 Creating Your App, 108 PhoneIntents, 508
Part 3 Language and Core Objects, 267 PhoneNumber, 497
Part 4 Libraries, 442 PhoneOrientation, 509
PartialLock, 514 PhoneSensors, 509
Pass by Reference, 275 PhoneSms, 512
Pass by Value, 274 PhoneStateChanged, 507
Password, 480 PhoneVibrate, 513
PASSWORD_QUALITY_ALPHABETIC, PhoneWakeState, 513
451 PictureTaken, 463
PASSWORD_QUALITY_ALPHANUMERI Pitch, 545
C, 451 Pixel, 159
PASSWORD_QUALITY_NUMERIC, 451 Placeholder Calculations, 389
PASSWORD_QUALITY_UNSPECIFIED, Play, 381, 456, 458, 459, 462, 516
451 Play Store Compatibility Check, 118
PasswordMode, 398, 406, 569 PlayAudio, 509
PasswordSufficient, 451 PlayVideo, 509
18 Index
Polymorphism, 247 Prompt, 430, 519
Popularity of Android Versions, 117 Properties Help area, 147
Popup Module Tab Menu, 79 Properties list, 143
Popup Variable Evaluation, 55 Properties Window, 143
Port, 490, 491, 535 Properties Within Scripts, 162
Position, 382, 462, 538 Protocol, 535
POSITIVE, 340 Public Variables, 230
PostBytes, 480 Public vs Private Subs, 246
PostFile, 480 Public vs Private Variables, 245
PostString, 480 Publishing and Monetizing Your App, 254
Power, 316 Purchase, 101
Preface, 37 Put, 380
PreferenceActivity Library, 520 PutBoolean, 467
PreferenceActivity Limitations, 520 PutByte, 467
PreferenceCategory, 520 PutBytes, 467
PreferenceManager, 521 PutDouble, 467
PreferenceScreen, 522 PutExtra, 372
Preliminary SQL Steps, 215 PutFloat, 467
Prepare Your App’s Google Play Page, 262 PutInteger, 467
Preparing the User’s Device, 263 PutLong, 467
Preparing Your Library, 446 PutNull, 467
Prescribed Resolutions, 257 PutShort, 467
Preview, 463 PutString, 467
Primary Key, 212 Query, 465
Primitive Types, 269 QueryAsync, 466
Private Variables, 230 QueryComplete, 538
Prn, 472 QueryIntentActivities, 502
Problems Opening the Channel, 181 Queue, 552
Process, 228 QueuedSegmentsCountChanged, 456
Process_Globals, 109 QueueSegment, 456
Process_Globals in Starter Service, 234 Quick Search, 89
Process_Globals Variables, 234 QUOTE, 316
Processing the SQL, 225 RadioButton, 422
Product, 503 RAM, 188
ProductId, 548 Random Numbers, 325
ProfileName, 535 RandomAccessFile, 528
Progress, 421 RandomAccessFile Library, 523
ProgressBar, 136, 420 Randomize, 325
ProgressDialog, 136 Rank, 271
ProgressDialogHide, 316 Reacting to an Event, 292
ProgressDialogShow, 316 Read, 369, 517
ProgressDialogShow2, 316 ReadAll, 369
Project attributes, 446 ReadBytes, 367, 527, 529
Project Attributes, 110, 254 ReadDouble, 529
Project Attributes Region, 81 ReadEncryptedObject, 529
Project Icon, 113 ReadFloat, 529
Project Menu, 70 Reading and Writing Excel Files, 362
Index 19
ReadInt, 529 Remote Compilation Mode, 50
ReadLine, 369 RemoteViews, 386
ReadList, 365, 369 Remove, 88, 380, 393, 467
ReadLong, 529 Remove an entry, 379
ReadMap, 366 Remove Elements, 374
ReadMap2, 366 Remove Layout, 139
ReadObject, 529 RemoveAllViews, 336, 419
ReadShort, 529 RemoveAt, 375, 416, 430
ReadSignedByte, 529 RemoveClip, 354
ReadString, 366 RemoveHeaders, 476
ReadUnsignedByte, 529 RemovePermission, 115
Ready, 369, 463 RemoveView, 399, 401, 403, 406, 408, 410,
Record, 211, 455, 460 412, 416, 419, 421, 423, 425, 427, 430,
RecordComplete, 454 433, 435, 437, 440, 462, 470
Rect, 356, 486 RemoveViewAt, 336, 419
Recursive Types, 280 Rename a table, 226
Red, 339, 563 Renaming of Variables, 170
ReDim, 322 REPEAT_RESTART, 453
Reference, 305 REPEAT_REVERSE, 453
Reference SQL Library, 214 RepeatCount, 453
Reference to Non-Primitives, 270 Repeating Structures, 323
Referencing Libraries, 444 RepeatMode, 453
Reflection Library, 571 Replace, 327, 392
Reflector, 572 RequestAccessoryPermission, 550
Refresh, 486 RequestFocus, 336, 399, 401, 403, 406,
RefreshAll, 486 408, 410, 412, 416, 419, 422, 423, 425,
Regex, 316, 384 427, 430, 433, 435, 437, 440, 462, 470
Regex Methods, 317 RequestNewPassword, 451
Regex Options, 317 RequestPermission, 551
Regions, 80 RerunDesignerScript, 336
Register, 535 Reset, 154
Register as a Google Play Developer, 262 ResetPalette, 564
Registering, 534 ResetPassword, 451
Registering as a Google Play Developer, Resolution, 159
262 ResolveHost, 489
Registering B4A, 101 Resources, 41
RegistrationDone, 534 Response, 563, 565, 566, 567, 568, 569,
RegistrationFailed, 534 570, 571
Regular Expressions, 283 Response Codes, 561
Relational Data, 212 ResponseError, 475
Relational Operators, 282 ResponseSuccess, 475
Release, 170, 382, 455, 456, 458, 459, 464, Restart, 173
478, 480, 545 Restoring All Windows, 100
Release Mode, 170 Restricting the Drawing Area, 204
ReleaseKeepAlive, 514 Restriction of Process_Globals Variables,
ReleasePartialLock, 514 235
Remote Compilation, 54 Restrictions, 303
20 Index
Resume, 459 Save to and Load from a File, 379
Retrieve Elements, 374 Save to and Load from Files, 374
Retrieve Entry, 378 SaveCSV, 542
Retrieving data, 225 SaveCSV2, 543
Return, 317 Saving and Retrieving Data, 278
Returned value, 292 Saving and Retrieving Settings, 125
Returning Data to B4A, 441 Saving Data, 241
Returning from an Activity, 126 Saving Permanent Data, 241
Revision Color Coding, 79 Saving Temporary Data, 241
RGB, 340, 563, 564, 565 Sax, 552
Right, 357 SaxParser, 553
RIGHT, 340 Scale, 160, 373
RINGER_NORMAL, 503 Scale display to real size, 192
RINGER_SILENT, 503 Scaling strategy, 165
RINGER_VIBRATE, 503 Screen Size, 160, 192
RingtoneManager, 514 ScreenBright, 469
Rnd, 317, 325 ScreenHeight, 486
RndSeed, 317, 325 ScreenOff, 507
Rotate, 469 ScreenOn, 507
Rotating Device, 235 Screens and Layouts, 126
Rotating the Device, 57 ScreenWidth, 487
Rotating the Emulator, 151 Script General, 153
Round, 317, 325 Script Language, 161
Round2, 317 Script Toolbar, 153
RowCount, 538 Script Variant, 153
Run B4A-Bridge on your device, 48 Script Windows, 152
Run your app, 65 ScrollingBackgroundColor, 416, 568
RunMethod, 484, 574 ScrollPosition, 409, 425
RunMethod2, 575 ScrollToNow, 409, 425
RunMethod3, 575 ScrollView, 424
RunMethod4, 575 SD Card, 189, 360
RunMethodJO, 484 SdkVersion, 503
Running a Virtual Device and scaling for SearchView, 558
Real Size Emulation, 191 Seconds, 468
Running from Batch Files, 171 SeekBar, 426
Running Scripts, 159 Select, 318
Running the Designer, 58 Select – Case, 285
RunPublicmethod, 575 SelectAll, 399, 406
RunStaticMethod, 575 SelectedIndex, 430
Runtime Errors, 297 SelectedItem, 430
Sample DBUtils Program, 221 Selecting Variants, 161
Sample Projects Using Services, 253 Selecting views, 157
Sample SQLite Program, 222 SelectionStart, 399, 406
SANS_SERIF, 343 Self reference, 248
Saturation, 564 Selling Your App, 261
Save, 139 Send, 491, 512
Save the program, 48 Send To UI Cloud, 142
Index 21
Send2, 513 SetItems, 399
SendBroadcastIntent, 503 SetItems2, 399
SendDtmf, 536 SetLanguage, 545
Sender, 318 SetLayout, 337, 399, 401, 403, 407, 409,
SendKeepAlive, 535 411, 412, 417, 420, 422, 423, 426, 427,
SendToBack, 336, 399, 401, 403, 407, 409, 430, 433, 435, 437, 440, 462, 471
410, 412, 416, 420, 422, 423, 425, 427, SetLayoutAnimated, 437
430, 433, 435, 437, 440, 462, 470 SetManifestAttribute, 116
Serial, 531, 547, 549 SetMute, 456, 504
Serial Library, 530 SetNextFocusDown, 449
SERIF, 343 SetNextFocusLeft, 449
ServerSocket, 488 SetNextFocusRight, 449
Service, 387 SetNextFocusUp, 450
Service Attributes, 81, 251 SetOnClickListener, 576
Service Code, 250 SetOnCreateContextMenuListener, 576
Service Module, 249 SetOnFocusListener, 576
Set, 375 SetOnKeyListener, 576
SetActivityAttribute, 115 SetOnLongClickListener, 576
SetActivityResult, 336 SetOnTouchListener, 576
SetApplicationAttribute, 116 SetPaletteAt, 565
SetArray, 575 SetPasswordQuality, 451
SetArray2, 575 SetProgress, 387
SetBackgroundImage, 337, 399, 401, 403, SetProxy, 475
407, 409, 411, 412, 417, 420, 422, 423, SetProxy2, 475
426, 427, 430, 433, 435, 437, 440, 462, SetPublicField, 577
471 SetPublicField2, 577
SetBoolean, 522 SetRate, 459
SetColorAnimated, 437 SetReceiverAttribute, 116
SetComponent, 372 SetRingerMode, 504
SetContentDescription, 449 SetScreenBrightness, 504
SetContentEncoding, 476 SetScreenOrientation, 504
SetContentType, 476 SetSelection, 417
SetCustomFilter, 482 SetServiceAttribute, 116
SetDate, 567 SetStaticField, 577
SetDBVersion, 220 SetStaticField2, 577
SetDefault, 516 SetString, 522
SetElevationAnimated, 420 setTabContentViewPadding, 578
SetField, 484, 576 setTabEnabled, 578
SetField2, 576 setTabEnabled2, 578
SetField3, 576 setTabGradientDrawable, 578
SetField4, 576 setTabGradientDrawable2, 578
SetFocus, 325 setTabHeight, 579
SetHeader, 476 setTabHostPadding, 579
SetHttpParameter, 475 setTabTextColor, 579
SetImage, 386 setTabTextColorStateList, 579
SetInfo, 384 setTabTextSize, 579
SetInfo2, 384 setTabTitle, 579
22 Index
setTabVisibility, 579 SipAudioCall, 535
setTabVisibility2, 579 Size, 189, 366, 375, 380, 417, 430, 529, 553
SetText, 387 SizeChanged, 468, 487
SetTextColor, 387 Skin, 188
SetTextColorAnimated, 437 Skip, 369
SetTextSize, 387 Sliding Pages, 123
SetTextSizeAnimated, 438 Smart Strings, 388
SetTime, 571 SMB, 558
SetTimeZone, 345 Sms, 516
Setting Backgrounds of Views and the SmsDelivered, 507
Activity, 196 SmsInterceptor, 517
Setting Icons, 254 SmsMessages, 518
Setting Label Transparency, 326 SmsSentStatus, 507
Setting Your Project Parameters, 254 Snapshot, 189
SetTrackMute, 457 Snr, 472
SetType, 372 Socket, 488
SetVisible, 387 Sort, 375
SetVisibleAnimated, 438 Sort a List, 374
SetVolume, 382, 458, 459, 504 SortCaseInsensitive, 376
SHA1 Certificate Fingerprint, 260 SortType, 376
Shared Event Handler, 293 SortTypeCaseInsensitive, 376
Shared Modules, 229 Sound, 384
Shared Modules Folder, 107 SoundPool, 458
Shell, 326, 505 Source, 561, 572
ShiftLeft, 338 Sources of Icons, 256
ShiftRight, 338 Speak, 546
Short, 269 Speak Button, 558
Show, 500, 563, 564, 565, 566, 567, 568, SpeakerMode, 536
569, 570, 571 Specifying Functional Arguments, 38
ShowCalendar, 567 Specifying Menus, 38
ShowDropDown, 399 SpeechRate, 546
Showing Tables to the User, 213 Speed, 474
ShowKeyboard, 482 SpeedValid, 474
ShowOnlyFolders, 568 Spinner, 427
ShowRingtonePicker, 516 Split, 317, 386
ShowSign, 570 Split2, 317, 386
Shutdown, 507 Splitting Long Lines, 269
Signing, 258 SQL, 222, 538
Signing for Distribution, 258 SQL Library, 222, 536
Simple Example of Usage, 284 SQL Object, 214, 215, 222
Sin, 318 SQLCipher, 559
SinD, 318 SQLite, 222
Single line, 308 SQLite Commands, 223
SingleLine, 399, 407 SQLiteBrowser, 214
SingleLineLayout, 417 SQLiteExceptions, 222
Sip, 534 SQLiteSpy, 214
Sip Library, 534 Sqrt, 318
Index 23
SrcRect, 469 Stopping B4A-Bridge, 52, 66
Standard Libraries, 443 StopPreview, 464
Standard Libraries included with Full StopService, 319
Version, 448 StopTicking, 487
Standard Screen, 160 Storing Data, 211
Standard Variant, 148 StreamBuffer, 458
Starred, 497 StreamError, 457
Start, 453, 472 StreamReady, 457
StartActivity, 242, 318 String, 270, 387
StartAudio, 536 String “Members”, 327
StartDiscovery, 531 String functions, 300
StartElement, 553 String Functions Library, 391
Starter Service, 109 String manipulation, 299
StartForeground, 387 StringBuilder, 392
StartListening, 511, 549 Strings obfuscation, 170
StartPreview, 464 StringUtils, 541
StartService, 319 StringUtils Library, 541
StartServiceAt, 319 Structure Matching, 86
StartServiceAtExact, 319 STYLE_BOLD, 343
StartsWith, 392 STYLE_BOLD_ITALIC, 343
StartTicking, 487 STYLE_ITALIC, 343
State_Checked, 358 STYLE_NORMAL, 343
State_Disabled, 358 Sub, 320
State_Enabled, 358 Sub Activity_Create, 239
State_Focused, 358 Sub Activity_Pause, 240
STATE_OFF, 531 Sub Activity_Resume, 240
STATE_ON, 531 Sub Class_Globals, 245
State_Pressed, 358 Sub Globals, 237
State_Selected, 358 Sub Process_Globals, 234, 236
STATE_TURNING_OFF, 531 SubExists, 320
STATE_TURNING_ON, 531 Subject, 501
State_Unchecked, 358 Subroutine Dropdown List, 79
StateChanged, 530 Subroutines, 323
StateListDrawable, 199, 357 SubRoutines, 251
StateManager, 559 Subs, 291
Statement Separator, 268 Subs within a Class or Code Module, 231
Status Bar, 119 Subs within Activity and Service Modules,
StatusBarNotification, 492 232
StatusCode, 478 Subscribing to Additional Library
StdActionBar Library, 559 Updates, 443
Step Value, 287 SubString, 392
Steps for Creating a Custom View Class, SubString2, 392
403 Success, 481
Stop, 382, 453, 458, 459, 462, 472, 546 Sync, 88
StopForeground, 387 TAB, 320
StopListening, 508, 511, 518, 533, 549 Tab Groups, 94
StopLoading, 440 Tabbed Views, 123
24 Index
TabChanged, 431 Tick, 487
TabCount, 434 TickerText, 493
TabHost, 431 Ticks, 343
TabHostExtras Library, 577 TicksPerDay, 345
TabIndex, 326 TicksPerHour, 345
Table, 211 TicksPerMinute, 345
Table creation, 223 TicksPerSecond, 345
Table of Contents, 4 Time, 345, 474
TableView, 559 TimeDialog, 571
Tabs, 122 TimeFormat, 346
Tag, 337, 399, 401, 403, 407, 409, 411, Timeout, 476
412, 417, 420, 422, 423, 426, 427, 430, TimeOut, 489
434, 435, 438, 440, 462, 471, 481, 487 TimeParse, 346
TakePicture, 464 Timer, 326, 394
Tan, 320 TimesContacted, 497
TanD, 320 TimeTicks, 571
Tap for Tap, 559 TimeZoneOffset, 346
TapForTap, 261 Title, 337
Target, 187, 577 Title Bar, 120
TargetRank, 577 TitleColor, 337
Telling the IDE where to find additional To, 501
libraries, 555 To obtain or update a user library, 560
Telling the IDE where to find Additional ToastMessageShow, 135, 320
Libraries, 444 ToBinaryString, 339
Terminated, 523 ToBytesArray, 368, 528
test, 546 Toggle Library, 579
Testing your App, 180 ToggleButton, 434
Text, 399, 401, 403, 407, 412, 424 ToggleMute, 536
Text encoding, 361 ToHexString, 339
Text Properties, 162 ToLowerCase, 392
Text Size, 160 ToOctalString, 339
Text Style, 147 Toolbar, 77
TextChanged, 397, 404 Tools Menu, 72, 140
TextColor, 399, 401, 403, 407, 412, 424, Top, 337, 357, 399, 401, 403, 407, 409,
430, 435 411, 412, 417, 420, 422, 424, 426, 427,
TextOff, 435 431, 434, 435, 438, 440, 462, 471
TextOn, 435 TOP, 340
TextReader, 368 ToPrettyString, 485
TextSize, 399, 401, 403, 407, 412, 424, toString, 373, 462, 490, 491
431, 435 ToString, 394, 485, 577
TextToSpeechFinish, 508 Touch, 295, 332, 418, 487
TextWriter, 369 Touch Event, 238
The Integrated Development ToUpperCase, 392
Environment, 67 Transactions, 223
The Project, 109 TransactionSuccessful, 540
The Visual Designer, 138 Transparent, 340
ThreadId, 517 Trim, 327, 392
Index 25
Troubleshoot Connection Problems, 195 UnsignedShiftRight, 339
True, 320 Until, 321
Try, 320 Up, 400
Try-Catch, 299 Up Button, 121
TTS, 543 Update, 466
TTS Library, 543 UpdateAsync, 466
Tutorial, 414, 469 UpdateDelete, 466
Twitter, 266 UpdateRecord, 220
Two Versions, 44 UpdateRecord2, 221
TwoLinesAndBitmap, 417 UpdateWidget, 387
TwoLinesLayout, 417 Updating records, 225
Type, 321, 517, 549 Updating to a new version, 107
Type Checking, 274 Upgrade to Full Version, 101
Type Conversion, 271 Upload your App to Google Play, 263
Type variables, 280 Uri, 467
TYPE_ACCELEROMETER, 511 URI, 547
TYPE_ALARM, 516 Url, 440
TYPE_DRAFT, 519 USB Debugging, 182
TYPE_FAILED, 519 USB Driver, 183
TYPE_GYROSCOPE, 512 USB Host, 559
TYPE_INBOX, 519 USB Library, 546
TYPE_INCOMING, 495 USB_CLASS_APP_SPEC, 551
TYPE_LIGHT, 512 USB_CLASS_AUDIO, 551
TYPE_MAGNETIC_FIELD, 512 USB_CLASS_CDC_DATA, 551
TYPE_MISSED, 495 USB_CLASS_COMM, 551
TYPE_NOTIFICATION, 516 USB_CLASS_CONTENT_SEC, 551
TYPE_ORIENTATION, 512 USB_CLASS_CSCID, 551
TYPE_OUTBOX, 519 USB_CLASS_HID, 551
TYPE_OUTGOING, 495 USB_CLASS_HUB, 551
TYPE_PRESSURE, 512 USB_CLASS_MASS_STORAGE, 551
TYPE_PROXIMITY, 512 USB_CLASS_MISC, 551
TYPE_QUEUED, 519 USB_CLASS_PER_INTERFACE, 551
TYPE_RINGTONE, 516 USB_CLASS_PHYSICA, 551
TYPE_SENT, 519 USB_CLASS_PRINTER, 551
TYPE_TEMPERATURE, 512 USB_CLASS_STILL_IMAGE, 551
TYPE_UNKNOWN, 519 USB_CLASS_VENDOR_SPEC, 551
Typeface, 342, 400, 402, 403, 407, 412, USB_CLASS_VIDEO, 551
424, 435 USB_CLASS_WIRELESS_CONTROLLER
TypeName, 577 , 551
Types, 269 USB_DIR_IN, 551
Types of Libraries, 443 USB_DIR_OUT, 551
UDPPacket, 489 USB_ENDPOINT_DIR_MASK, 551
UDPSocket, 490 USB_ENDPOINT_NUMBER_MASK, 551
Uncaught Runtime Exceptions, 109, 297 USB_ENDPOINT_XFER_BULK, 551
Unicode, 361 USB_ENDPOINT_XFER_CONTROL, 551
Unique name, 113 USB_ENDPOINT_XFER_INT, 551
Unload, 459 USB_ENDPOINT_XFER_ISOC, 551
26 Index
USB_ENDPOINT_XFERTYPE_MASK, Variants Window, 148
551 VB6, 328
USB_INTERFACE_SUBCLASS_BOOT, VB6 versus B4A, 322
551 VendorId, 548
USB_SUBCLASS_VENDOR_SPEC, 551 Version, 547, 563, 564, 565, 566, 567, 568,
USB_TYPE_CLASS, 551 569, 570, 571, 577
USB_TYPE_MASK, 551 Version of Android, 44
USB_TYPE_RESERVED, 552 Version of B4A, 44
USB_TYPE_STANDARD, 552 VersionCode, 337
USB_TYPE_VENDOR, 552 Versioning, 215
UsbAccessory, 546 VersionName, 337
UsbDevice, 547 Versions, 44
UsbDeviceConnection, 548 Vertical Tab Group, 94
UsbEndpoint, 549, 552 Vibrate, 384, 513
UsbInterface, 549 Video Tutorials, 266
UsbManager, 550 VideoRecordApp, 459
UsbRequest, 552 VideoView, 460
USBSerial, 559 View, 436
Use Host GPU, 190 View and Layout Concepts, 58
Use of Unassigned Variables, 274 View Controls, 156
UsedInFix, 473 View Drawables, 196
User Help, 254 View Events, 294
User Support, 262 View Properties, 144
UserAndPasswordRequired, 438 Views, 331, 396
UserClosed parameter, 241 Views Must be Global, 233
UserEnabled, 472 Views Tree, 153
Username, 481 Views within an Activity, 331
UserPresent, 508 Visibility and Lifetime of Variables and
Using a Popup Menu, 63 Subs, 230
Using Inline Code to access Libraries, 445 Visibility of Subroutines, 231
Using Integers, 322 Visibility of Variables, 281
Using Libraries, 444 VisibilityChanged, 487
Using SQLite to Convert Ticks to Strings, Visible, 400, 402, 403, 407, 409, 411, 413,
226 417, 420, 422, 424, 426, 427, 431, 434,
Using the Android Virtual Device 435, 438, 440, 462, 471
Manager, 185 Visual Designer, 99
Using the Designer Tools Menu, 62 VM Heap, 188
Val, 325 VoiceRecognition, 519
Value, 427, 564 VOLUME_ALARM, 455, 505
Values, 381 VOLUME_MUSIC, 455, 505
Variable Can Specify Dimensions, 278 VOLUME_NOTIFICATION, 455, 505
Variable Placeholders, 389 VOLUME_RING, 455, 505
Variables, 161, 269 VOLUME_SYSTEM, 455, 505
Variables in other Activity Modules, 243 VOLUME_VOICE_CALL, 455, 505
Variables List, 177 Warning Bug in Emulator, 151
Variables within an Activity, 236 Warning Engine, 90
Variables within Other Subs, 231
Index 27
Warning Set Internal Properties before Windows Character Sets, 362
External, 162 Windows Menu, 77, 143
warnings, 91 Windows-1252, 362
Watches, 177 WithAppendedId, 467
Ways of Monetizing Your App, 260 WithAppendedPath, 467
We’d Like to Hear from You, 41 Wrap, 400, 407
WebView, 438 WrapAsIntentChooser, 372
What is a Class?, 244 WrapInputStream, 526
What is a library?, 443 WrapOutputStream, 526
What You Need to Run B4A, 44 Write, 370, 524
What you see, 45 Write2, 524
When Does Android Kill a Process?, 228 WriteByte, 529
When is Activity_Pause called?, 240 WriteBytes, 368, 528, 529
When one activity opens another using WriteDouble, 529
StartActivity, 238 WriteEncryptedObject, 530
When second activity closes and first WriteFloat, 530
activity resumes, 238 WriteInt, 530
When the screen is turned back on, 237 WriteLine, 370
When the screen is turned off, 237 WriteList, 366, 370
When the user brings your app to front WriteLong, 530
after running a different app, 238 WriteMap, 366
When the user clicks the Back button, 238 WriteObject, 530
When the user first launches your app or WriteShort, 530
brings it to the front after quitting, 237 WriteString, 366
When the user rotates the device, 238 WriteToStream, 347
When the user runs another app, 237 WYSIWYG Designer Menu, 140
When to Use a Service, 251 XHDPI, 257
When to use a Try-Catch, 299 XML, 552
When your app calls Activity.Finish, 238 XMLBuilder, 559
Where to find your files, 194 XmlSax Library, 552
Which ones does a project need?, 560 Xor, 339
While, 321 XXHDPI, 257
White, 340 XXXHDPI, 257
Who this Book is For, 37 Year, 567
Why this recommendation?, 149 Years, 468
Why use a Service, 249 Yellow, 340
Width, 337, 347, 373, 400, 402, 403, 407, Your First App, 46
409, 411, 413, 418, 420, 422, 424, 426, Your Second App Using the Designer, 58
427, 431, 434, 436, 438, 440, 462, 471 Your Third App, 66
Window Menu, 93 YouTube, 559
Window Menus, 93 Zoom, 440
Window Tabs, 86 Zoom Control, 79
Windows Area, 86 ZoomEnabled, 440

You might also like