1. J

    Android Question Convert Double with Enum to String

    I have a long number from database. The number is 100000000 I need yo do some mathematics operation When I put it into Double, its turn into 1.0E8. After I've done with the mathematics operation, I need to convert the number into string. But it still retain 1.0E8 format. How do I change it back...
  2. Pedro Caldeira

    Android Question Use formula in string to calculate

    Hello guys, Is there any way to perform a calculation with the elements in a string for instance, i have "2x10/20" it can be any other calculus, like "(234/403)-20*50" but they are string can I somehow convert them to numbers to perform the operations ? Thanks
  3. M

    iOS Question String with two dimension different behavior between b4i and b4j

    Hello, I have defined a string variable with 2 dimensions. If I execute this code in B4i I get a different result like in b4j. I would expect the same result in b4i as in B4j. Can someone explain me what I am doing wrong? dim lv_array(2,2) as string lv_array(0,0) = "containername"...
  4. M

    Bug? SmartString compiler bug (?)

    Hi everyone, i was using the UDPSocket to send some packets to my server. I noticed something weird, if i try to compile my code the compiler crashes saying: Sub Button1_Click For i=0 To 100 UDPSocket1.Initialize("UDP", 0, 2048) Dim Packet As UDPPacket Dim...
  5. S

    Android Question Save settings common across multiple applications

    I'm having a hard time grasping how to save settings that are shared by multiple applications. Like let's say I have a company that has 5 applications and I want my users to login to just one of them, but maintain login across all 5. I know how to process login. I know how to save a map to a...
  6. Eric McDonald

    Android Question Using Searchview to capture String

    Hello all, Fairly new to B4A, so this may be a simple question... but it's got me stumped. I am using a SearchView as found in the SearchViewExample (found on the forum). However, I am having difficulty implementing it into my own code. What I wish to do is take the selected text (from the...
  7. F

    Android Question [SOLVED]Very Slow Loop

    I have a for-loop where I fill with data a string variable (that I have already Created). It takes 6 to 10 secs to complete. Log($"BEFORE loop- $time{DateTime.Now}"$) Dim n As Int = crs.RowCount - 1 Dim lvHtml As String = $"<!DOCTYPE...
  8. P

    B4J Question String parse

    Hi Everyone! Gotten stuck trying to receive some data from a post request and put it into a database, I get data like this; 'PIRTIMEOUT 001306894=5000' I need to put the 5000 (**** in the code)part into the database the other number being the device number (Num, in the code) it has to go...
  9. D

    Android Question String comparison

    Hi, Guys I have a problem with string comparison, the line IF fcmToken = webFcmToken then always fails (see code below). I have viewed tokens with in debug an they appear identical. Also tried .trim and even .toupper but still failed the comparison. Also tried and...

    Android Question hidding strings into the code

    Hello, For security, Is it necessary, and if yes what is the best method to do for: Hidding particulary parameters or constant or var into the code, like : Public PhaRcs As String = "Mypassword" ' Password Public WebSite As String = "" ' Url Public...
  11. Ahmet KOÇ

    B4R Question How to combine variables and text ?

    I have tried many methods. "dddd" variable, "ddddd" + variable, "ddddd" .variable ... how do I combine a string variable with text in an application.
  12. K

    Android Question string.replace() changing special character in string

    i have a string : msg = "%this is test message%" I am changing special character "%" = "%25" msg.Replace("%","%25") Its showing error :: Error occurred on line: 49 (Main) java.lang.ClassCastException: java.lang.String cannot be cast to$RemoteObject at...
  13. C

    Android Question Encoding Text when Manually Building JSON

    I'm manually building in code, some JSON files, but have a hit a problem where I need to ensure that characters like " ' [ & etc are encoded, as if I don't, the recipient can't parse the resulting file. Is there a function somewhere that will allow me to convert a text string to a JSON friendly...
  14. A

    Android Question Get item in string

    Hello, Can someone please send an example of how to get item from string with items? (I am using json with OkHttpUtils2) The string setting is : Dim name As List = root.Get("name") For Each colname As String In name Next (how to get for example item number 3 that equals to...
  15. K

    Android Question double decimal

    I have string 725517.5 I want its to show as 725517.50
  16. K

    Android Question App crashes when trying to change a label's text

    Hello! I'm new to this forum (and generally in B4A and Android programming) and this is my first post. I have a problem with the app I'm developing. This is the code causing the crash, but I don't know how to fix it: Private DriveStartHour As Int = -1 Private DriveStartMin As Int = -1...
  17. Alexander Stolte

    Android Question Check if there are only emojis in the string

    Hello, Is there an easy way to check if only emojis in a string? I would like to check this to highlight it by changing the text size, like Instagram where you can see the emojis in large size when sending only one emoji or two. Greetings
  18. A

    Android Question inStr(in VB - does a string contain "..") - how to in B4A?

    hi, I need to search for a word in a string. I tried InStr, but its not exist. Does someone knows how can I search for some String in other string (like inStr on VB)? Thanks.
  19. J

    Android Question B4A - Maximum Length of a String?

    I looked in the manual under strings, and did a search but could not find this - Is there a maximum length for a string in B4A? If so what is it? Same as for B4i and B4j?