Hello+questions

axelands

New Member
Hello i am new :sign0089:
i love programming vb was great but c++make me :BangHead: well
3 questions
1 how i publish my .apk files?
2 it is possible to send SMS with wi-fi without use the credit
3 it is this code ok
tnx
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Do you mean how to install an apk file?
There are several ways to do it. You can copy the file to the sdcard and then use a file manager to install it. If your device supports debugging then the IDE will automatically install it. Other options: http://www.b4x.com/forum/basic4andr.../6905-nice-utity-wireless-file-transfers.html
2. Not that I'm aware of.
3. Some corrections are required:
B4X:
Sub Process_Globals

End Sub

Sub Globals
    Dim name As String
    Dim EditText1 As EditText
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout1") 'Load the layout file.
    Dim number As Int
    number = Rnd(1, 4) 'Choose a random number between 1 to 3
    If number = 1 Then
        name = "sophie"
    Else If number = 2 Then
        name = "nina"
    Else If number = 3 Then
        name = "angus"
    End If
    'another way:
'    Dim names() As String
'    names = Array As String("sophie", "nina", "angus")
'    name = names(Rnd(0, 3))
End Sub

Sub Button1_Click
    If EditText1.Text.ToLowerCase = name Then
        ToastMessageShow("Well done.", True)
    Else
        ToastMessageShow("No thats not.", False)
    End If
    EditText1.SelectAll
End Sub
 
Upvote 0

axelands

New Member
my code + problem

this code is for just play
1.the cpu thinks a number 1 to 25
2.with the number select his pre determinated name
3.you need to "discover the name"
problem:
the compiling sofware says this error:
Compiling code. Error
Error parsing program.
Error description: Missing Keyword: end if
Occurred on line: 85
End Sub
IF YOU NEED IT TO RE COPY HERE IS IT WITHOUT NUMBRES
:sign0085:ME
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…