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