Jump to content

ZRomik

Members
  • Content Count

    54
  • Joined

  • Last visited

Everything posted by ZRomik

  1. ZRomik

    READ_SMS permission not requested

    Hi! I wrote small app for Android for test. In OnCreate method I request Some permission from OS FStorageRead := JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE); FStorageWrite := JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE); FReadSms := JStringToString(TJManifest_permission.JavaClass.READ_SMS); PermissionsService.RequestPermissions([FReadSms, FStorageRead, FStorageWrite], nil, DisplayRationale); So, only requests READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE works fine. Is anybody know why READ_SMS permission not requested? I use for test my Xiaomi Redmi Note 4 with MIUI-10 on Android 6.0. On Android emulator is the same thing.
  2. ZRomik

    READ_SMS permission not requested

    Yes! On phone work too Thanks for help Lars Fosdal
  3. ZRomik

    READ_SMS permission not requested

    After clean and rebuild project on emulator READ_SMS permission work fine. I Try on phone after charging them
  4. ZRomik

    READ_SMS permission not requested

    >Has SMS access been enabled for the app in the Android settings? Yes And I enable "Read SMS"and "Send SMS" in "Uses Permissions" tab in Project Options
  5. Is there an ics library for lazarus?
  6. Today I got strange assert This assert raised before I free the components. I'm doing rest auth, after close app and got assert.
  7. Hello all! I'm writing small program for rest authorization. So, authorization process is OK. I successfull get "access" and "refresh" tokens. Next I need to post GET request on some url with the following header: "Authorization: Bearer *Access token wich I got*" In the internet I fouded an example how to write get request and writed following code: procedure TForm1.RetrieveUserInfo; var url: string; rcv: TMemoryStream; begin url := sAuthURL + 'oauth/verify'; rcv := TMemoryStream.Create; slhtpcli.RcvdStream := rcv; slhtpcli.ExtraHeaders.Add('Autorization: Bearer ' + FAccToken); mmo1.Lines.Clear; slhtpcli.URL := url; try slhtpcli.GetASync; finally mmo1.Lines.LoadFromStream(rcv); FreeAndNil(rcv); end; end; Response from server always empty. What I'm writed wrong?
  8. ZRomik

    TSslHttpCli

    Thank for help. I'm doing sync request in for cycle and sometime got yhis error. Problem solved when i add empty for cycle for 1000 times.
  9. ZRomik

    TSslHttpCli

    Another question about HttpCli. How do I know if a component is ready to work? Sometime I get error
  10. ZRomik

    TSslHttpCli

    OK. Thanks
  11. ZRomik

    TSslHttpCli

    Can you tell me more how to do this?
  12. ZRomik

    TSslHttpCli

    Angus, is there possible get response from server not by event, like in Synapse eg
  13. ZRomik

    TSslHttpCli

    all that had to be done was to add this code. cli1.Accept := 'application/json;'; Now I successfull recieve data from server. Thanks for help!
  14. ZRomik

    TSslHttpCli

    I tried to build manual the parameters with SuperObject but still got error
  15. ZRomik

    TSslHttpCli

    I tried to do that you say, but got error too. This is the example from server I tried to use both address string: "POST https://esi.evetech.net/latest/universe/ids/?datasource=tranquility&language=en-us" and "POST https://esi.evetech.net/latest/universe/ids/" with same result
  16. ZRomik

    TSslHttpCli

    Angus, I'm really can't find where specifyed Json parameters in example you told
  17. ZRomik

    TSslHttpCli

    In examples I can't find sample with post request.
  18. ZRomik

    TSslHttpCli

    About error Bad request: The exception class is EHttpException. This class described in unit OverbyteIcsHttpProt.pas. Its's not response from server, but internal component error as I understad.
  19. ZRomik

    TSslHttpCli

    I set breakpoint at line cli1.Post and look inside component code: In method AdjustDocName field FDocName changed from '/latest/universe/ids/' to 'document.htm' When we enter in method "TCustomWSocket.DnsLookup" the field "FDnsLookupHandle" is equal 0 and code after line 9438( unit OverbyteIcsWSocket.pas) not executing. So, we not execute DnsLookup and DnsList is clear. As I understud we not establish connection with server and not sent any data
  20. ZRomik

    TSslHttpCli

    Looks like program not send any data to host
  21. ZRomik

    TSslHttpCli

    I'm download and run Wireshark. Set filter as "ip.dst == 52.51.209.180"(ping to esi.evetech.net gave me that address). But wireshark does't seen any packet to host, exclude ping
  22. ZRomik

    TSslHttpCli

    OK. I'll try to find another app. Tnanks for advise.
  23. ZRomik

    TSslHttpCli

    I add code FSndStrm.Seek(0, soFromBeginning); But this not helps. I recieve from server "{"error":"too few items for 'names', 'names' is required"}"
  24. ZRomik

    TSslHttpCli

    Again trying send post-request as follow: if Not Assigned(FRcvStr) then FRcvStr := TMemoryStream.Create; if not Assigned(FSndStr) then FSndStr := TMemoryStream.Create; s := '{"names": ["Water"]}'; FSndStr.Write(s[1], Length(s)); cli1.SendStream := FSndStr; cli1.RcvdStream := FRcvStr; cli1.PostASync; So, If I use method Post then I get eror "BadRequest". If I use method PostAsync then I got answer; "{"error":"too few items for 'names', 'names' is required"}". Looks like data not sending to server.
  25. ZRomik

    TSslHttpCli

    Hello Again! OK, I need to get some data from server accross post-request. I write small app but always get error "Bad request". Can you see my code please? I use property ContentTypePost for set content-type as "application/json" post_test.zip
×