httputils

caillaud

Member
Licensed User
Longtime User
HI
thanks a lot
miracle it works
But I have not yet understanden where I make the mistake!!!
I would not like to do it again
could you expain
sincerely
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
thanks a lot
I am completely stupid
hotel and holtel
I am very sorry for making your time to loose
I apologyze
very sincerely
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
I create a code module:messub
in this code module I insert this sub
B4X:
Sub recuphotel(meshotels As String,listv As ListView)
Dim myarray() As String:myarray=Regex.Split("]",meshotels)
listv.Clear
listv.TwolinesLayout.Label.TextSize = 15
listv.TwoLinesLayout.SecondLabel.TextSize=15
listv.TwolinesLayout.Label.TextColor =Colors.red
listv.TwolinesLayout.SecondLabel.TextColor =Colors.ARGB(255,0,133,158) '"#FF00859E"
'listv.FastScrollEnabled = true
'listv.SingleLineLayout.Label.Gravity = Gravity.CENTER
 Dim cd As ColorDrawable
 cd.Initialize(Colors.White, 0dip)
 listv.TwolinesLayout.Background=cd
Dim i As Int
For i=0 To myarray.Length-1
Dim myarraybis() As String:myarraybis=Regex.Split("\|",myarray(i))
listv.AddTwoLines(myarraybis(0) & ":",myarraybis(1)) 
Next
listv.AddSingleLine("--------------------------------")
End Sub

1)I get:
Compiling code. Error
Error parsing program.
Error description: Syntax error.
Occurred on line: 6
Sub recuphotel(meshotels As String,listv As ListView)
2)when using this code , which works fine, in the main module
I am obliged to add
listv.AddSingleLine("--------------------------------")
for seeing the last hotel on the emulator

thanks in advance
sincerely
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
you are right
I have missed the end of Sub Process_Globals in my module
It works fine now.
when a radiobutton is checked the middle of the disk becomes green
(unchecked the disk is silver)
is it possible to change green into #FF00859E
#FF00859E is the background color of the smartphone:
Dim cd As ColorDrawable
cd.Initialize(Colors.ARGB(255,0,133,158), 0dip)
Activity.Background = cd
thans in advance
sincerly
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
thanks again
it is not very important
more worrying is that:
Error. Url=https://www.travelhotelonline.com/testvb4android?query=1hotelselect1 Message=javax.net.ssl.SSLException: Not trusted server certificate

my thawte ssl certificat is a 1024 certificat that is daily used in the application on PC
in the windows phone 7 application the https is accepted by the websevice

is there something to do

sincerely
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
thanks for your answer
SUPER it works
I changed
'hc.Initialize("hc")
by hc.InitializeAcceptAll("hc")
in Sub Service_Create of httputilsService

sincerely
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
do:, and /
are special caracters in the functions:
regex.split(",",mystring)
regex.split("/",mystring)
in the doubt is it better to put \ before?
thanks in advance

sincerely
michel
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
According to this website: Regex Tutorial - Literal Characters and Special Characters
There are 11 characters with special meanings: the opening square bracket [, the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the opening round bracket ( and the closing round bracket ).

If in doubt, you should confirm whether or not it is a special character.
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
thanks for your answer
there is one other problem which worries me:
on wp7 there is that they call isolated storage:
it is possible to store data on the smartphone
when a client books the first time he inserts:
hotel, dates of stay
first and last name tel mail
bank card references
with the isolated storage it is possible to store and retrieve personnal data
next times he books he just have to insert his trip
is it possible to do something like this?
sincerely
michel
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Whereas I dont find it completely safe to store this information on the phone, it is possible.
The directory File.DirInternal can only be accessed the your app. No other application/process can access it.
However, on a rooted phone it is easy to access any directory.
So maybe you can store it Encrypted for security reasons.
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
httputlis

hi
thanks for your patience
if you agree I come back to you later for this isolated storage
it is too sophisticated for me for the moment
the following sub is in my code module:messub
B4X:
Sub listedatesarr(lang As String, daterangeserveur As String, datesvertesdep As String, Listv As ListView, plagetempsdeb As String, itemselect As Int)
Listv.Visible=True
Listv.Clear
Listv.Left=0
Listv.Width=220
Dim i As Int:i = 0
plagetempsdeb = plagetempsnew(lang, daterangeserveur, 0, 29)
Dim myarray() As String:myarray =Regex.Split("]", plagetempsdeb)
Listv.SingleLineLayout.Label.TextSize=15
Listv.SingleLineLayout.Label.TextColor=Colors.ARGB(255,0,133,158) '"#FF00859E"
Dim cd As ColorDrawable
 cd.Initialize(Colors.White, 0dip)
 Listv.SingleLineLayout.Background=cd
For i = 0 To myarray.Length - 1
Listv.AddSingleLine(myarray(i).Replace("|",""))
Next
itemselect=2
End Sub
when I call this sub in the main module
listview1:fine
but the value of plagetempsdeb and itemselect are not changed by the sub
please why?
in ms visual studio there is byval (not changed) and byref (modified)
sincerely
michel
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
httputls

Hi
thanks for your answer
1)from a futur sub in the code module messub
I will have to retreive 8 string variables
could you tell me how to make a custum type with this 8 varaibles
2)for a control I do not see where activating the font property bold in the designer
sincerely
michel
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Custom Types are made by:

Declare in Globals:

B4X:
Type EightStrings(String1 as String, String2 as String,String3 as String, String4 as String,String5 as String, String6 as String,String7 as String, String8 as String)

Then in your sub:
B4X:
Sub ModifyEightStrings(es as EightStrings)
    es.String1 = "Hello"
    es.String2 = es.String3
End Sub

To change the Font (Style) of a view, you will have to use code:
B4X:
EditText1.Typeface = Typeface.DEFAULT_BOLD
Basic4android - Constants (Core)
 
Upvote 0

caillaud

Member
Licensed User
Longtime User
Hi
thanks very much
the custom type and the font bold work fine
I am laboriously transfering data from the server to the smartphone
It seems I can fix that now
it is going to take a long time
The problem is that the look of my smartphone is ugly

I will have to take care of that later
sincerely
michel
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…